Help on Vim

From Asibot & HOAP3 & TEO Wiki
Revision as of 11:07, 13 September 2010 by Ivanmg (talk | contribs)
Jump to navigation Jump to search

[jgvictores]'s startup settings:

colorscheme pablo
source $VIMRUNTIME/mswin.vim
behave mswin
set guifont=Monospace\ 16
set tabstop=4
set shiftwidth=4
set expandtab

[jgvictores]'s for windows (not too good):

set guifont=fixedsys:h11

[ivanmg]'s startup settings:

set nocompatible
set cpoptions +=Fq "F->Change buffer name when :write q->set the cursor in between joined lines
set backup " make backup files
set backupdir=~/.vim/backup " where to put backup files
set directory=~/.vim/tmp " directory to place swap files in
set hidden " you can change buffers without saving

" Toggle hidden characters display
map <silent> <F6> :set nolist!<CR>:set nolist?<CR>

syntax on
set nu
set t_Co=256
colorscheme Mustang
set bg=dark
set showcmd
set cursorline
hi CursorLine cterm=bold
set lazyredraw " do not redraw while running macros
set scrolloff=3 " Keep 10 lines (top/bottom) for scope
set sidescrolloff=5 " Keep 5 lines at the size
set showmatch
" space / shift-space scroll in normal mode
noremap <backspace> <C-b>
noremap <space> <C-f>
" move with ctrl + hjkl in insert mode
imap <C-h> <Left>
imap <C-j> <Down>
imap <C-k> <Up>
imap <C-l> <Right>

set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set foldmethod=marker

set incsearch
set hlsearch
set ignorecase      "ic:    ignores case when pattern matching
set smartcase	     "scs:   ignores ignorecase when pattern contains uppercase characters
set wildmenu
set mouse=a

" Toggle spell-checking
map <silent> <F8> :set nospell!<CR>:set nospell?<CR>
runtime plugins/spellfile.vim
setlocal spelllang=es

" Maps Omnicompletion to CTRL-space
inoremap <Nul> <C-x><C-o>
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType java set omnifunc=javacomplete#Complete
filetype plugin on

[ivanmg]'s for gvim

highlight Normal guifg=gray guibg=black
set gfn=Bitstream\ Vera\ Sans\ Mono\ 12