I am a Linux user at heart and the Leopard command line is very bland compared to what I am used to. The default vim is also pretty bland and unimpressive. I thought I would share a few of the settings I have found or plundered from Linux installations in order to make vim more usable.
This can go in your .vimrc or in a global location such as /usr/share/vim/vimrc. I would be interested in what other command line and vim users do to improve Leopard. I have various aliases in order to add colour to various commands too.
set nocompatible " Use Vim defaults
set bs=2 " backspacing over everything in insert mode
set ai " Auto indenting
set history=100 " keep 100 lines of history
set ruler " show the cursor position
set viminfo=’20,\”200 ” keep a .viminfo file
syntax on ” syntax highlighting
set hlsearch ” highlight the last searched term
filetype plugin on ” use the file type plugins
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if ! exists("g:leave_my_cursor_position_alone") |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif |
\ endif
Leave a Reply