Tag Info

Hot answers tagged

3

If you don't want to remember whether to put a \ before a non-alphanumeric character, put \v ("very magic") or \V ("very nonmagic") at the beginning of your search. If you use "very magic", any literal symbol will require a backslash. With "very nonmagic", all symbols will be literal unless they have a backslash.


2

The history is persisted in the viminfo file; you can configure what (and how many of them) is persisted via the 'viminfo' (and 'history') options. You can clear the history via the histdel() function, e.g. for searches: :call histdel('/') You can even delete just certain history ranges or matching lines. Alternatively, you could also just edit the ...


2

Search for a plain & (unescaped) and you will match this character. If you want the & surrounded by whitespace (or rather alone at a word boundary) you'd type \<&\>. (Both of those regexps must be initiated by vim's search command /.) Note the difference: \ is the escape character for a special interpretation of the subsequent character, ...


1

The first thing that is sourced when Vim starts up is its ~/.vimrc; after that, plugins are loaded according to the 'runtimepath' option. Therefore, to use a separate Vim environment, you just need to pass in a different .vimrc location (via -u /path/to/vimrc), and in there modify the 'runtimepath' accordingly (i.e. away from the default ~/.vim/ directory ...


1

You could also set your default text editor by using the following command. sudo update-alternatives --config editor



Only top voted, non community-wiki answers of a minimum length are eligible