Here are my vim settings, makes working with vim a whole lot easier. Vim doesn’t have to be a pain in the butt, it’s just configured to be that way by default due to backwards compatibility to vi.
/etc/vim/vimrc.local or /etc/vim/vimrc.local
1 2 3 4 5 6 7 8 | syntax on filetype plugin on set showcmd set showmatch set autowrite set mouse=a set pastetoggle= map :source /etc/vim/vimrc.numbertoggle^M |
/etc/vim/vimrc.numbretoggle
1 2 3 4 5 6 7 8 9 | " number-toggle script " Licensed under the GNU General Public License " See: http://www.gnu.org/licenses/licenses.html :if &number == 0 set number :else set nonumber :endif :echo &number == 0 ? "Line Numbering now OFF" : "Line Numbering now ON" |
These are great…especially numbertoggle and mouse=a.
and because I keep forgetting how to enter ^M in vim: Ctrl-V then Ctrl-M