![]() I was going to write about how the one big drawback to fzf is that it’s an external command and doesn’t work with MacVim, but now it does! Support has been recently added by using the new native terminals in Vim 8. Source /usr/local/opt/fzf/shell/completion.zshįi # fzf via local installation if thenįi # fzf + ag configuration if _has fzf & _has ag then export FZF_DEFAULT_COMMAND = 'ag -nocolor -g ""' export FZF_CTRL_T_COMMAND = " $FZF_DEFAULT_COMMAND" export FZF_ALT_C_COMMAND = " $FZF_DEFAULT_COMMAND" export FZF_DEFAULT_OPTS = ' The FZF environment variables are also used when fzf is called from within Vim: # fzf via Homebrew if then source /usr/local/opt/fzf/shell/key-bindings.zsh And since I’ve configured fzf to use ag, it’ll ignore anything excluded by. In Zsh, I can hit Ctrl-t to instantly fuzzy-find any file in the current directory. agignore files so you no longer need to keep a giant wildignore string in your vimrc.įzf works in the shell as well and comes with bindings for Zsh, Bash, and the Fish shell. When using fzf, make sure to tell it to use ag, a grep/ ack replacement called the Silver Searcher. I practically never use tabs - more on that later - so it’s important that I can switch my focus to something I’m thinking of with as little friction as possible. The most useful commands are :Buffers, :Files, and :Tags, which I’ve bound to and, t and, r respectively: nmap :Buffers īinding is important because I live and breathe buffers. Simply follow the installation instructions (basically brew install fzf on macOS with Homebrew) and install the additional fzf.vim plugin for badass lightspeed functionality.įzf comes with a basic Vim plugin but its functionality is minimal, so fzf.vim was created to provide all of the functionality you would expect. fzf, however, shows no speed difference between files or tags - it’s blazingly fast either way. Ctrl-P used to do okay on a 30,000-file codebase on my 2013-era MacBook Pro but started to slow down during a search on an enormous tags file to the point of being unusable. Fuzzy-finding is so useful that it’s become a standard feature on modern text editors.įor years Ctrl-P has been the reigning fuzzy-finding champ, but a new tool, fzf, is faster and more forgiving when trying to find one file or tag among thousands. TextMate and Sublime Text showed us that the fastest way to find a file is by fuzzy finding, which means typing parts of a filename or path or tag or whatever you’re looking for, sometimes even if the characters aren’t adjacent or you making a spelling error. I also have a separate install script for updating and installing Vim plugins. ALE is the new Syntastic because it’s asynchronousĪs always, my dotfiles and vimrc are available publicly.I’ve been doing a lot more work with Vim lately and have spent some time configuring my workflow for peak efficiency, so here’s a snapshot of my current state. Vim 8 added a lot of much-needed functionality, and new community sites like VimAwesome have made plugin discovery and evaluation easier. An interesting background color combined with white in the foreground will do the job.My earlier posts ( 1, 2) about using Vim were well received and it’s about time for an update. ![]() Right now, I'm only writing text, so I don't need syntax highlighting. If possible, I'd like to keep things simple, but I'll download a theme file if that's absolutely necessary. vimrc file to configure more complicated, visually interesting background colors for MacVim like darkslategrey or oceandeep? (I've poked around in the man pages and vi wikis, but can't seem to find the answer). Is there any way to add a line or two to the. Another background I'd like to experiment with is "ocean deep". (As an aside, this is in no way intended as a pro-Emacs comment I like both vi and Emacs equally and don't want to ignite a flame war). If I had my druthers, I'd prefer to configure a background like the "darkslategrey" available in the Emacs camp, and use it with white text. Sadly, the schemes are limited to a dozen or so, and none of them float my boat. You can also configure color schemes via a line in your. The app comes with a feature-complete and sophisticated gui, including a menu for selecting color schemes. Recently, I've begun using MacVim, the Mac OS X port of the Vim text editor, on Snow Leopard.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |