vim “modifiable” is off
:set ma which is short for :set modifiable will make a buffer modifiable. And :set noma does the opposite.
:set ma which is short for :set modifiable will make a buffer modifiable. And :set noma does the opposite.
In Normal mode: :set hlsearch Then search for a pattern with the command / in Normal mode, or <Ctrl>o followed by / in Insert mode. * in Normal mode will search for the next occurrence of the word under the cursor. The hlsearch option will highlight all of them if set. # will search for … Read more
The default font is Bitstream Vera (search for ‘default font’ on that page). So why not just specify that, but with a different font size? E.g. :set guifont=Bitstream\ Vera\ Sans\ Mono:h14 This approach also ensures that if in future the default changes (e.g. to the system default, Monaco), you will still have your preferred font … Read more
You can type f<character> to put the cursor on the next character and F<character> for the previous one.
MacVim is just Vim. Anything you are used to do in Vim will work exactly the same way in MacVim. MacVim is more integrated in the whole OS than Vim in the Terminal or even GVim in Linux, it follows a lot of Mac OS X’s conventions. If you work mainly with GUI apps (YummyFTP … Read more
I don’t think I’d to add anything to the path, did brew install macvim mvim -v should then open macvim in the terminal, you can also go ahead and alias that alias vim=’mvim -v’
Use Ctrl–N to get a list of word suggestions while in insert mode. Type :help i_CTRL-N to see Vim’s documentation on this functionality. Here is an example of importing the Python dictionary into Vim.
You can use built-in profiling support: after launching vim do :profile start profile.log :profile func * :profile file * ” At this point do slow actions :profile pause :noautocmd qall! (unlike quitting noautocmd is not really required, it just makes vim quit faster). Note: you won’t get information about functions there were deleted before vim … Read more
The <Leader> key is mapped to \ by default. So if you have a map of <Leader>t, you can execute it by default with \+t. For more detail or re-assigning it using the mapleader variable, see :help leader To define a mapping which uses the “mapleader” variable, the special string “<Leader>” can be used. It … Read more