Difference between revisions of "Help on Vim"
Jump to navigation
Jump to search
Jgvictores (talk | contribs) |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | Mustang is at http://hcalves.deviantart.com/art/Mustang-Vim-Colorscheme-98974484 | ||
+ | or just put http://www.deviantart.com/download/98974484/Mustang_Vim_Colorscheme_by_hcalves.vim into ~/.vim/colors/ | ||
+ | |||
[jgvictores]'s startup settings: | [jgvictores]'s startup settings: | ||
colorscheme pablo | colorscheme pablo | ||
Line 20: | Line 23: | ||
" Toggle hidden characters display | " Toggle hidden characters display | ||
map <silent> <F6> :set nolist!<CR>:set nolist?<CR> | map <silent> <F6> :set nolist!<CR>:set nolist?<CR> | ||
− | + | ||
syntax on | syntax on | ||
set nu | set nu | ||
Line 30: | Line 33: | ||
hi CursorLine cterm=bold | hi CursorLine cterm=bold | ||
set lazyredraw " do not redraw while running macros | set lazyredraw " do not redraw while running macros | ||
− | + | ||
set scrolloff=3 " Keep 10 lines (top/bottom) for scope | set scrolloff=3 " Keep 10 lines (top/bottom) for scope | ||
set sidescrolloff=5 " Keep 5 lines at the size | set sidescrolloff=5 " Keep 5 lines at the size | ||
set showmatch | set showmatch | ||
− | + | ||
" space / shift-space scroll in normal mode | " space / shift-space scroll in normal mode | ||
noremap <backspace> <C-b> | noremap <backspace> <C-b> | ||
Line 71: | Line 74: | ||
highlight Normal guifg=gray guibg=black | highlight Normal guifg=gray guibg=black | ||
set gfn=Bitstream\ Vera\ Sans\ Mono\ 12 | set gfn=Bitstream\ Vera\ Sans\ Mono\ 12 | ||
+ | |||
+ | ---- | ||
+ | [Win32] defaults: | ||
+ | |||
+ | set nocompatible | ||
+ | source $VIMRUNTIME/vimrc_example.vim | ||
+ | source $VIMRUNTIME/mswin.vim | ||
+ | behave mswin | ||
+ | |||
+ | colorscheme pablo | ||
+ | set tabstop=4 | ||
+ | set shiftwidth=4 | ||
+ | set expandtab | ||
+ | set guifont=Consolas:h16 | ||
+ | |||
+ | set diffexpr=MyDiff() | ||
+ | function MyDiff() | ||
+ | let opt = '-a --binary ' | ||
+ | if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif | ||
+ | if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif | ||
+ | let arg1 = v:fname_in | ||
+ | if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif | ||
+ | let arg2 = v:fname_new | ||
+ | if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif | ||
+ | let arg3 = v:fname_out | ||
+ | if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif | ||
+ | let eq = '' | ||
+ | if $VIMRUNTIME =~ ' ' | ||
+ | if &sh =~ '\<cmd' | ||
+ | let cmd = '""' . $VIMRUNTIME . '\diff"' | ||
+ | let eq = '"' | ||
+ | else | ||
+ | let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"' | ||
+ | endif | ||
+ | else | ||
+ | let cmd = $VIMRUNTIME . '\diff' | ||
+ | endif | ||
+ | silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq | ||
+ | endfunction |
Latest revision as of 12:09, 20 May 2011
Mustang is at http://hcalves.deviantart.com/art/Mustang-Vim-Colorscheme-98974484 or just put http://www.deviantart.com/download/98974484/Mustang_Vim_Colorscheme_by_hcalves.vim into ~/.vim/colors/
[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
[Win32] defaults:
set nocompatible source $VIMRUNTIME/vimrc_example.vim source $VIMRUNTIME/mswin.vim behave mswin colorscheme pablo set tabstop=4 set shiftwidth=4 set expandtab set guifont=Consolas:h16 set diffexpr=MyDiff() function MyDiff() let opt = '-a --binary ' if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif let arg1 = v:fname_in if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif let arg2 = v:fname_new if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif let arg3 = v:fname_out if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif let eq = if $VIMRUNTIME =~ ' ' if &sh =~ '\<cmd' let cmd = '""' . $VIMRUNTIME . '\diff"' let eq = '"' else let cmd = substitute($VIMRUNTIME, ' ', '" ', ) . '\diff"' endif else let cmd = $VIMRUNTIME . '\diff' endif silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq endfunction