VIM Settings

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

syntax on
filetype plugin on
set showcmd
set showmatch
set autowrite
set mouse=a
set pastetoggle=<F12>
map <F9> :source /etc/vim/vimrc.numbertoggle^M


/etc/vim/vimrc.numbretoggle

” 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”

No related posts.

Trackback URL

2 Comments on "VIM Settings"

  1. Matt
    17/10/2008 at 7:33 pm Permalink

    These are great…especially numbertoggle and mouse=a.

  2. dopefish
    09/08/2009 at 11:44 am Permalink

    and because I keep forgetting how to enter ^M in vim: Ctrl-V then Ctrl-M

Hi, leave a comment:


Connect with Facebook

ALLOWED XHTML TAGS:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to Comments
Performance Optimization WordPress Plugins by W3 EDGE