4 ms·
For any Windows devs that happen to use vim inside of mintty (that comes with downloading git), you'll discover that installing fzf doesn't work out so well. It
by grimgrin 10y ago
For any Windows devs that happen to use vim inside of mintty (that comes with downloading git), you'll discover that installing fzf doesn't work out so well. It'd be fine on cygwin, surely. In mintty, though, it'll yell about missing ncurses and then offer to install the legacy Ruby version, which also fails for curses related reasons.
So, that said, check out ctrl-p.
https://github.com/ctrlpvim/ctrlp.vim https://github.com/ctrlpvim/ctrlp.vim
It's a nice quick way to see a filelist that you can filter, like fzf. You can filter on:
* the whole project, excluding .gitignore stuff
* all open buffers
* Most Recently Used (MRU) file list
In addition to the built in ^p binding, I also add:
nnoremap <leader>v :CtrlPMRUFiles<cr>
nnoremap <leader>b :CtrlPBuffer<cr>
- sevensor 10y ago> vim inside of mintty (that comes with downloading git), Is git for windows using msys2 yet? If not, do yourself a favor and start using msys2 instead. It has packages for git and vim, and it uses pacman for pacage management. I've had a great experience using it.
- grimgrin 10y agoThis looks really promising. Thanks. And Git for windows is using mintty, which is a terminal emulator for cygwin, msys, and msys2, but I'm not really sure what is being provided/used. A buncha unix tools and definitely not a package manager. And for those unaware: > MSYS2 is an independent rewrite of MSYS, based on modern Cygwin (POSIX compatibility layer) and MinGW-w64 with the aim of better interoperability with native Windows software. > The name is a contraction of Minimal SYStem 2, and aims to provide support to facilitate using the bash shell, Autotools, revision control systems and the like for building native Windows applications using MinGW-w64 toolchains. > We wanted a package management system to provide easy installation of packages, and ported Arch Linux's Pacman. This brings many powerful features such as dependency resolution and simple complete system upgrades, as well as providing the build system - makepkg{,-mingw} - which is used to make these packages Also: http://stackoverflow.com/a/25023611/463678 http://stackoverflow.com/a/25023611/463678 Github: https://msys2.github.io/ https://msys2.github.io/
- sevensor 10y agoMsys2 also has mintty, and I can attest that tmux works great, if that's a consideration. This is pretty much where I spend my days (Msys2 / mintty / tmux / vim) when I have to work in Windows.
- grimgrin 10y agoIs there a popular convention for using something like this or cygwin, in that it has its own $HOME, and I have a buncha dotfiles in my Windows user home? Possibly just symlinking it all over to MSYS $HOME? I am definitely happy about being able to install tmux. edit: just seems like I should ditch what I was doing in windows home, because git bash used the same home and I had everything there. ssh stuff, git config, inputrc, .vim, etc. But if I'm no longer using git bash, no need. edit: sadly git runs very oddly in this. not sure what git bash is doing differently, but I'm comparing .64 seconds for a git status, versus over a minute with MSY2. weird.
- sevensor 10y ago> edit: sadly git runs very oddly in this. not sure what git bash is doing differently, but I'm comparing .64 seconds for a git status, versus over a minute with MSY2. weird. Yikes! I work on a fairly compact codebase, so I've never waited more than a minute for anything except sometimes when fetching. (For that I blame the network, but I could be wrong.) Other operations seem snappy, and tig is pretty responsive. That being said, I haven't benchmarked against git for windows, so I could be wrong about that. Sorry to hear it's so laggy for you!