Created
December 4, 2016 17:37
-
-
Save mskorzhinskiy/9af44a1cd803c6aa45fa6ef02db1400b to your computer and use it in GitHub Desktop.
My old vimrc file (used for Perl projects)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""""""""""""""""""""""""""""""""""""""""""""""" | |
" File: .vimrc " | |
" Create Date: Nov 04, 2010 " | |
" Author: Michail Skorzinskiy " | |
" email : [email protected] " | |
" jabber: [email protected] " | |
"""""""""""""""""""""""""""""""""""""""""""""""" | |
" Plugins: | |
"""""""""""""""""""""""""""""" | |
" First install: | |
" git clone https://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim | |
filetype off | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
" Required: | |
set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
endif | |
call neobundle#begin(expand('~/.vim/bundle/')) | |
NeoBundleFetch 'Shougo/neobundle.vim' | |
NeoBundle 'tpope/vim-speeddating' | |
"""""""""""""""""""""""""""""" | |
" Description: use CTRL-A/CTRL-X to increment dates, times and more | |
"""""""""""""""""""""""""""""" | |
NeoBundle 'airblade/vim-gitgutter' | |
"""""""""""""""""""""""""""""" | |
" Description: A Vim plugin which shows a git diff in the gutter (sign column) | |
" and stages/reverts hunks. | |
"""""""""""""""""""""""""""""" | |
NeoBundle 'scrooloose/syntastic' | |
"""""""""""""""""""""""""""""" | |
" Description: Syntax checking plugin that runs files through external | |
" syntax checkers and displays any resulting errors to the user. | |
"""""""""""""""""""""""""""""" | |
NeoBundle "Shougo/neocomplcache.vim" | |
"""""""""""""""""""""""""""""" | |
" Description: Ultimate auto-completion system for Vim. | |
"""""""""""""""""""""""""""""" | |
NeoBundle 'craigemery/vim-autotag' | |
"""""""""""""""""""""""""""""" | |
" Description: Automatically discover and 'properly' update ctags files on | |
" save | |
"""""""""""""""""""""""""""""" | |
NeoBundle 'majutsushi/tagbar' | |
"""""""""""""""""""""""""""""" | |
" Description: Vim plugin that displays tags in a window, ordered by scope | |
" http://majutsushi.github.com/tagbar/ | |
"""""""""""""""""""""""""""""" | |
NeoBundle 'craigemery/vim-autotag' | |
"""""""""""""""""""""""""""""" | |
" Description: Automatically discover and 'properly' update ctags files on | |
" save | |
"""""""""""""""""""""""""""""" | |
NeoBundle 'scrooloose/nerdcommenter' | |
"""""""""""""""""""""""""""""" | |
" Description: Provides many different commenting operations and | |
" styles which are invoked via key mappings and a menu. | |
"""""""""""""""""""""""""""""" | |
NeoBundle 'tpope/vim-surround' | |
"""""""""""""""""""""""""""""" | |
" Description: Provides mappings to easily delete, | |
" change and add such surroundings in pairs. | |
"""""""""""""""""""""""""""""" | |
NeoBundle 'Raimondi/delimitMate' | |
"""""""""""""""""""""""""""""" | |
" Description: This plug-in provides automatic closing of quotes, | |
" parenthesis, brackets, etc.. | |
"""""""""""""""""""""""""""""" | |
NeoBundle 'rasmikun/vim-colors-solarized' | |
"""""""""""""""""""""""""""""" | |
" Descriptions: Precision colors for machines and people | |
"""""""""""""""""""""""""""""" | |
NeoBundle 'bling/vim-airline' | |
"""""""""""""""""""""""""""""" | |
" Description: Lean & mean status line for vim that's light as air. | |
"""""""""""""""""""""""""""""" | |
NeoBundle 'Shougo/vimproc', { | |
\ 'build': { | |
\ 'windows' : 'make -f make_mingw32.mak', | |
\ 'cygwin' : 'make -f make_cygwin.mak', | |
\ 'mac' : 'make -f make_mac.mak', | |
\ 'unix' : 'make -f make_unix.mak', | |
\ } | |
\ } | |
"""""""""""""""""""""""""""""" | |
" Description: Great asynchronous execution library for Vim. | |
" Compilation required. | |
"""""""""""""""""""""""""""""" | |
call neobundle#end() | |
filetype plugin indent on | |
NeoBundleCheck | |
"""""""""""""""""""""""""""""" | |
" General: | |
"""""""""""""""""""""""""""""" | |
syntax on | |
filetype plugin indent on | |
set nocompatible | |
" Synchronized unnamed register with clipboard | |
set clipboard^=unnamed | |
set foldmethod=indent"marker | |
set fileformats=unix,dos | |
set nobackup | |
set noswapfile | |
" Disable bell in vim | |
set vb " see 'visualbell' | |
set t_vb= | |
set nu " set vim numerate | |
imap <F11> <Esc>:set<Space>nu! <cr> | |
nmap <F11> :set<Space>nu!<cr> | |
if (has('gui_running')) | |
set guioptions=none | |
endif | |
au FileType perl map <leader>rr :!perl %<CR> | |
"""""""""""""""""""""""""""""" | |
" Text: | |
"""""""""""""""""""""""""""""" | |
set textwidth=80 | |
set winminheight=0 | |
set ai " auto indent | |
set si " smart indent | |
set fo-=t " prevent auto word wrapping | |
set tabstop=8 | |
set shiftwidth=4 | |
set smarttab " insert blanks according to shiftwidth | |
set expandtab " appropriate number of spaces to insert a tab | |
set pastetoggle=<F3> | |
nnoremap <F4> :set list!<cr> | |
"""""""""""""""""""""""""""""" | |
" Encoding: | |
"""""""""""""""""""""""""""""" | |
set encoding=utf-8 | |
set termencoding=utf-8 | |
set fileencoding=utf-8 | |
set wildmenu " make recode menu | |
set wcm=<Tab> " use <F8> and TAB to make choice | |
menu Encoding.CP1251 :e ++enc=cp1251 <cr> | |
menu Encoding.CP866 :e ++enc=cp866 <cr> | |
menu Encoding.KOI8-U :e ++enc=koi8-u <cr> | |
menu Encoding.UTF-8 :e ++enc=utf-8 <cr> | |
map <F8> :emenu Encoding.<TAB> | |
"""""""""""""""""""""""""""""" | |
" Spelling: | |
"""""""""""""""""""""""""""""" | |
setlocal spell spelllang=en_us,ru | |
map <F6> :setlocal spell! spelllang=en_us,ru<CR> | |
"""""""""""""""""""""""""""""" | |
" Navigation: | |
"""""""""""""""""""""""""""""" | |
" NerdTREE | |
let g:tagbar_left = 1 | |
let g:tagbar_autofocus = 1 | |
let g:tagbar_hide_nonpublic = 1 | |
let g:tagbar_autopreview = 1 | |
let g:tagbar_previewwin_pos = "rightbelow" | |
let g:vimfiler_as_default_explorer = 1 | |
nmap <silent> <F2> :VimFilerExplorer<cr> | |
nmap <silent> <C-W><C-V> :VimFilerSplit<cr> | |
nmap <silent> <C-W><C-W> :VimFiler<cr> | |
" Balance match pairs | |
let delimitMate_balance_matchpairs = 1 | |
" Windows | |
map <C-j> <C-W>j | |
map <C-k> <C-W>k | |
map <C-h> <C-W>h | |
map <C-l> <C-W>l | |
" Buffers | |
nmap <silent> = :call UpperNavigate('next')<cr> | |
nmap <silent> - :call UpperNavigate('prev')<cr> | |
nmap <silent> + :tabnew<cr> | |
nmap <silent> _ :bdelete<cr> | |
" Navigate through tabs if there are more than one tab, or through buffers | |
" otherwise. | |
function UpperNavigate(direction) | |
if tabpagenr('$') > 1 | |
exec "tab".a:direction | |
else | |
exec "b".a:direction.'!' | |
endif | |
endfunction | |
" Open last visited place, when opening file. | |
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | |
\| exe "normal! g'\"" | endif | |
"""""""""""""""""""""""""""""" | |
" Search: | |
"""""""""""""""""""""""""""""" | |
set iminsert=0 " for input | |
set imsearch=0 " and for search | |
set ic | |
set showmatch | |
set hlsearch " High light search | |
set incsearch | |
"""""""""""""""""""""""""""""" | |
" Colors: | |
"""""""""""""""""""""""""""""" | |
let g:solarized_termtrans=1 | |
let g:solarized_termcolors=256 | |
let g:solarized_visibility='low' | |
let g:gitgutter_sign_column_always = 1 | |
set background=dark | |
colorscheme solarized | |
"""""""""""""""""""""""""""""" | |
" Airline: | |
"""""""""""""""""""""""""""""" | |
set laststatus=2 | |
let g:airline_theme='simple' | |
let g:airline#extensions#tabline#enabled = 1 | |
set ttimeoutlen=25 | |
"""""""""""""""""""""""""""""" | |
" Syntax: | |
"""""""""""""""""""""""""""""" | |
let g:syntastic_enable_perl_checker = 1 | |
let g:syntastic_perl_checkers=['perl'] | |
"""""""""""""""""""""""""""""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment