For example, as a fan of soft-wrapping, I’ve made arrow keys and j/k move by screen lines instead of file lines. I can’t seem to learn to release that Shift key when I should. One of my many mappings makes :W works just like :w, to save a file. With your cursor at the start of the text one_two.three four, the cW command will replace the one_two.three part. This plugin introduces ,w (and ,b and ,e) as an even smaller word – namely the subparts of camelCase or snake_case. In Vim, w is the “small word” motion and W is the “big word” motion. Since I usually develop inside tmux, I run my tests in a tmux split using Vimux and Turbux. NERD tree has a lot of handy shortcuts – just hit ? in the NERD tree window to see them. I recommend setting up a mapping (I use ,N) to show the current file in the tree ( :NERDTreeFind or something more complex) – that can be quite convenient. I use NERD tree to orient myself in projects, and for some file management. I don’t love how it sorts files, though, so I might replace that part of it some day.įor project search, I mostly use git-grep-vim. #VIM RUBY RUNNER INSTALL#It’s easy to install (pure Vimscript) and has some nice features (e.g. I use ctrlp.vim for fuzzy file navigation. On a Swedish keyboard, \ requires two modifiers (Shift Opt 7) where, requires none, so it’s a no-brainer. It’s not the default ( \ is), but it’s a common alternative. That said, I have configured Vim so much that it’s hard to know where to start… Plugins and configuration So I take a bit of pride in knowing Vim well enough that I can get by without my configuration, and that I can write some one-off mappings and configuration as needed. I will sometimes pair with someone with a different configuration, and sometimes I use a bare-bones Vim on some server somewhere. The fact that you know it’s publicly available helps keep it relatively tidy.Īlthough I have a lot of Vim configuration, I try not to rely on it too much. You can experiment more freely when it’s easy to roll back to a previous state, and you can share your config with others. Putting your dotfiles in a public repo, such as on GitHub, is quite valuable, I think. I’ve since replaced and rewritten things to the point where I don’t think you could tell how it started. I started out with Janus, a “Vim distribution” of plugins and configuration. vimrc is a mere 8 lines, but only because I’ve extracted stuff to keep things tidy. I don’t go so far as to use Vim to edit every form field or email. I use Pages for quick rich-text stuff, Soulver occasionally for calculations, and Stickies for some kinds of notes. There are times when I’m not faithful to Vim. I use terminal Vim (currently version 7.4.712) via Homebrew on OS X, or in a Ubuntu VM, often within a tmux session. #VIM RUBY RUNNER CODE#It’s also my scratchpad for code experiments and exploration – more about that later. I also use it for blog posts (powered by Octopress) and notes from meetings and otherwise (I type text in a terminal to open my folder of notes). I use Vim at work and for personal projects writing mostly Ruby, CoffeeScript (JavaScript), Sass (CSS) and Slim (HTML). Though I guess the concept of a “power user” is tricky with Vim – the floor is high and I’m not sure if there’s a ceiling… I would describe myself as a bit of a power user – I’ve written a few plugins (also these tiny ones), have invested some time into my. I switched to Vim from TextMate 4 years ago. Vim-dispatch's :Make command is similar to Vim's :make, but it runs asynchronously.I’m Henrik Nyh ( a Swedish web developer. Vim-dispatch has several commands, but the two main ones are :Make and :Dispatch commands. If you're curious, check out :h job-channel-overview.txt. Vim and NeoVim actually supports async jobs, but they are beyond the scope of this chapter. In the remaining of this chapter, I will go over vim-dispatch, but I would strongly encourage you to try all of them out there. Luckily there are plugins to run async processes. Wouldn't it be nice if you can compile asynchronously so you can still use Vim during compilation? You don't want to be staring at a frozen Vim while waiting for your compilation process to finish. Sometimes compiling can take a long time. Watch your Typescript compiler work as expected! To see the list of error(s), run :copen.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |