http://www.vim.org/scripts/script.php?script_id=3465
https://livesoncoffee.wordpress.com/2013/04/12/install-tagbar-vim-plugin/
Winmanager:
http://vim.sourceforge.net/scripts/script.php?script_id=1440
Bufexplorer 7.3.5 (for Winmanager 2.41):
http://vim.sourceforge.net/scripts/script.php?script_id=42
Version 1
:filetype plugin on
set nocompatible
set autoindent
set smartindent
set autoread "auto re-read changed file
set showcmd "show partial commands as you type them
set hidden "new buffers can be opened without old ones being saved
set backspace=
set shiftwidth=4
set tabstop=4
map <c-w><c-f> :FirstExplorerWindow<cr>
map `` :BottomExplorerWindow<cr>
map <silent> `1 :nohl<cr>
nnoremap <silent> <cr> :nohl<cr><cr>
let g:winManagerWindowLayout='BufExplorer,TagsExplorer|FileExplorer'
let g:bufExplorerSortBy='number'
let g:winManagerWidth=23
let g:bufExplorerDefaultHelp=0
let g:tagbar_width=30
" Python
autocmd FileType python set expandtab
autocmd FileType thrift set syn=cpp
" disable automatic comment insertion
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" set list
set listchars=tab:»·,trail:·
" shift tabs using TAB or Shift+TAB
map <tab> v>
map <S-tab> v<
map <F1> :WMToggle<cr>
map <F2> :bprev<cr>
map <F3> :bnext<cr>
map <F4> :e
map <F5> :set nolist<cr>
map <F6> :set list<cr>
map <F7> :set noautoindent<cr>:set nosmartindent<cr>
map <F8> :set autoindent<cr>:set smartindent<cr>
map <F9> :TagbarToggle<cr>
map <F10> :tabprev<cr>
map <F11> :tabnext<cr>
map <F12> :tabnew
" C++
vmap <silent> {} :s/^/\/\//gi<cr>:nohl<cr>
vmap <silent> }{ :s/^\/\///gi<cr>:nohl<cr>
" SQL
" vmap <silent> <> :s/^/-- /gi<cr>:nohl<cr>
" vmap <silent> >< :s/^-- \=//gi<cr>:nohl<cr>
vmap <silent> <> :s!^\(\s*\)!\1-- !gi<cr>:nohl<cr>
vmap <silent> >< :s!^\(\s*\)-- \=!\1!gi<cr>:nohl<cr>
" spaces
" vmap <silent> <> :s/^/ /gi<cr>:nohl<cr>
" vmap <silent> >< :s/^ \=//gi<cr>:nohl<cr>
" Perl smart (Eclipse)
" vmap <silent> () :s/^/#/gi<cr>:nohl<cr>
" vmap <silent> )( :s!^\(\s*\)# \=!\1!gi<cr>:nohl<cr>
" Python simple
vmap <silent> () :s/^/#/gi<cr>:nohl<cr>
vmap <silent> )( :s/^#\=//gi<cr>:nohl<cr>
" dont use Q for Ex mode
map Q :q
map :Q :q
map W :w
" map :W :w
map D "_d
map DD "_dd
nmap ss :so ~/.vimrc<cr>
sy on
hi Search ctermbg=240
set hlsearch
hi MatchParen ctermbg=242 ctermfg=228
set t_Co=16
hi OverLength ctermbg=238
hi Visual ctermbg=242
match OverLength /\%79v.\+/
hi nonascii guibg=red ctermbg=red
match nonascii /[^\x00-\x7F]/
" trying to make light colorscheme a darker one
hi Comment ctermfg=33
hi Statement ctermfg=214
hi PreProc ctermfg=133
hi SpecialKey ctermfg=33
hi Search ctermbg=darkblue ctermfg=yellow
set matchpairs+=<:> "Подсвечивать парные скобки для HTML
set nobackup "Не создавать резервных копий файлов
set noswapfile "Не использовать swap-файл
set ignorecase "Игнорировать регистр символов при поиске
"Меню изменения кодировки чтения из файла
set wildmenu
set wcm=<Tab>
menu Encoding.Read.CP1251 :e ++enc=cp1251<CR>
menu Encoding.Read.CP866 :e ++enc=cp866<CR>
menu Encoding.Read.KOI8-U :e ++enc=koi8-u<CR>
menu Encoding.Read.UTF-8 :e ++enc=utf-8<CR>
map <F9> :emenu Encoding.Read.<TAB>
"Меню изменения кодировки записи в файл (Ctrl-F9)
set wildmenu
set wcm=<Tab>
menu Encoding.Write.CP1251 :set fenc=cp1251<CR>
menu Encoding.Write.CP866 :set fenc=cp866<CR>
menu Encoding.Write.KOI8-U :set fenc=koi8-u<CR>
menu Encoding.Write.UTF-8 :set fenc=utf-8<CR>
map <C-F9> :emenu Encoding.Write.<TAB>
Version 2
" a must-have
set nocompatible
set autoindent
" JavaScript
autocmd FileType javascript set shiftwidth=4
autocmd FileType javascript set tabstop=4
" disable automatic comment insertion
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
set list
set listchars=tab:»·,trail:·
" shift tabs using TAB or Shift+TAB
map <tab> v>
map <S-tab> v<
"map <F2> <esc>:tabprev<cr>
"map <F3> <esc>:tabnext<cr>
map <F2> <esc>:bprev<cr>
map <F3> <esc>:bnext<cr>
map <F4> <esc>:TlistToggle<cr>
:let Tlist_Ctags_Cmd='/home/mivanchenko/bin/ctags'
nmap `` \bv
map <F5> <esc>:set nolist<cr>
map <F6> <esc>:set list<cr>
" map <F7> <esc>:set background=light<cr>
" map <F8> <esc>:set background=dark<cr>
map <F8> <esc>I&_debug( );<esc>hhi
map <F9> <esc>:set noautoindent<cr>
map <F10> <esc>:set autoindent<cr>
map <F11> <esc>:tabnew
map <F12> <esc>:set enc=cp1251<cr>:edit<cr>
" comment/uncomment blocks of code (in vmode)
" Perl
" vmap () :s/^/# /gi<Enter>
" vmap )( :s/^# \=//gi<Enter>
" C++
" vmap {} :s/^/\/\/ /gi<Enter>
" vmap }{ :s/^\/\/ //gi<Enter>
" SQL
" vmap <> :s/^/-- /gi<Enter>
" vmap >< :s/^-- \=//gi<Enter>
" spaces
" vmap <> :s/^/ /gi<Enter>
" vmap >< :s/^ \=//gi<Enter>
" Perl smart (Eclipse)
vmap () :s/^/#/gi<Enter>
vmap )( :s!^\(\s*\)# \=!\1!gi<Enter>
vmap {} :s!^\(\s*\)!\1\/\/ !gi<Enter>
vmap }{ :s!^\(\s*\)\/\/ \=!\1!gi<Enter>
vmap <> :s!^\(\s*\)!\1-- !gi<Enter>
vmap >< :s!^\(\s*\)-- \=!\1!gi<Enter>
" dont use Q for Ex mode
map Q :q
map :Q :q
map W :w
map :W :w
map D "_d
map DD "_dd
nmap ss :so ~/.vimrc<cr>
:set enc=utf8
" :set enc=cp1251
" :edit
highlight MatchParen ctermbg=242 ctermfg=228
:set t_Co=16
:highlight OverLength ctermbg=238
:highlight Visual ctermbg=242
:match OverLength /\%79v.\+/
:sy on
:hi Search ctermbg=240
:set hlsearch
" trying to make light colorscheme a darker one
:hi Comment ctermfg=33
:hi Statement ctermfg=214
:hi PreProc ctermfg=133
:hi SpecialKey ctermfg=33
Version 3, for Mac
set nocompatible
set autoindent
set smartindent
set autoread "auto re-read changed file
set showcmd "show partial commands as you type them
set hidden "new buffers can be opened without old ones being saved
set backspace=
set shiftwidth=4
set tabstop=4
set binary
autocmd FileType python set expandtab autoindent nosmartindent backspace=indent softtabstop=4
autocmd FileType javascript set shiftwidth=4
autocmd FileType javascript set tabstop=4autocmd FileType python set expandtab autoindent nosmartindent backspace=indent softtabstop=4
autocmd FileType javascript set shiftwidth=4
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
set listchars=tab:»·,trail:·
map <tab> v>
map <S-tab> v<
map <F1> :TagbarToggle<cr>
map <F3> :tabn<cr>
map <F4> :tabnew
map <F6> :set list<cr>
map <F7> :set noautoindent<cr>:set nosmartindent<cr>
map <F8> :set autoindent<cr>:set smartindent<cr>
map <silent> §1 :nohl<cr>
vmap () :s/^/#/gi<Enter>§1
vmap )( :s!^\(\s*\)#\=!\1!gi<Enter>§1
vmap {} :s!^!\/\/!gi<Enter>§1
vmap }{ :s!^\(\s*\)\/\/\=!\1!gi<Enter>§1
vmap <> :s!^\(\s*\)!\1-- !gi<Enter>§1
vmap >< :s!^\(\s*\)-- \=!\1!gi<Enter>§1
set hlsearch
hi MatchParen ctermbg=242 ctermfg=228
set t_Co=16
hi OverLength ctermbg=238
hi Visual ctermbg=250
match OverLength /\%79v.\+/
set nobackup "Не создавать резервных копий файлов
set noswapfile "Не использовать swap-файл
set ignorecase "Игнорировать регистр символов при поиске
set wildmenu
set wcm=<Tab>
menu Encoding.Read.CP1251 :e ++enc=cp1251<CR>
menu Encoding.Read.CP866 :e ++enc=cp866<CR>
menu Encoding.Read.KOI8-U :e ++enc=koi8-u<CR>
menu Encoding.Read.UTF-8 :e ++enc=utf-8<CR>
map <F9> :emenu Encoding.Read.<TAB>
set wildmenu
set wcm=<Tab>
menu Encoding.Write.CP1251 :set fenc=cp1251<CR>
menu Encoding.Write.CP866 :set fenc=cp866<CR>
menu Encoding.Write.KOI8-U :set fenc=koi8-u<CR>
menu Encoding.Write.UTF-8 :set fenc=utf-8<CR>
map <C-F9> :emenu Encoding.Write.<TAB>
:let mapleader='§'
No comments:
Post a Comment