forked from andrei4ka/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
132 lines (105 loc) · 3.84 KB
/
Copy path.vimrc
File metadata and controls
132 lines (105 loc) · 3.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
" Sergii Golovatiuk's .vimrc
" Inspired by https://github.com/vgod/vimrc/blob/master/vimrc
" https://github.com/derekwyatt/vim-config/blob/master/vimrc
" http://spf13.com/post/perfect-vimrc-vim-config-file/
set nocompatible " not compatible with old-fashion vi mode
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'altercation/vim-colors-solarized'
Bundle 'scrooloose/nerdtree'
Bundle 'tpope/vim-fugitive'
Bundle 'tpope/vim-endwise'
Bundle 'bling/vim-airline'
Bundle 'vim-ruby/vim-ruby'
Bundle 'plasticboy/vim-markdown'
Bundle 'scrooloose/syntastic'
Bundle 'godlygeek/tabular'
Bundle 'msanders/snipmate.vim'
Bundle 'rodjek/vim-puppet'
Bundle 'Rykka/riv.vim'
Bundle 'davidhalter/jedi-vim'
" General Settings
set history=100 " keep 100 lines of last commands in history
set autoread " automatically read a file that is changed from outside
filetype on " enable filetype detection
filetype plugin on " enable filetype-specific indenting
filetype indent on " Enable filetype-specific plugins
syntax on " syntax highlight
" On Windows, use $HOME/.vim instead of vimfiles
if has('win32') || has ('win64')
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.vim/after
endif
if has("gui_running") " GUI colors and font settings
set guifont=Consolas:h14
set background=dark
colorscheme solarized
set guioptions-=r " Removing right scroll bar
endif
set clipboard+=unnamed " yank to the system register (*) by default
set wildmenu " wild char completion menu
set hlsearch " search highlighting
set incsearch " incremental search
" Ingore these files while expanding wild chars
set wildignore=*.o,*.class,*.pyc
set nobackup " no *~ backup files
set nowritebackup
set noswapfile
"set number " Line numbering is on
"set autoindent " auto indentation
"set smartindent " Use smart indendation if there is no indent file
"set copyindent " copy the previous indentation on autoindenting
set ignorecase " ignore case when searching
set smartcase " ignore case if search pattern is all lowercase, case-sensitive otherwise
set smarttab " insert tabs on start of line according to context
set backspace=2 " allow backspacing over everything including indent, eol in insert mode
set expandtab
set tabstop=2
set softtabstop=2
set shiftwidth=2
set modeline " Save tab specific settings to file /* ex: set tabstop=8 expandtab: */
" Language Settings
set keymap=russian-jcukenwin
set iminsert=0
set imsearch=0
set spelllang=ru_yo,en_us
highlight lCursor guifg=NONE guibg=Blue
" ENCODING SETTINGS
set encoding=utf-8
set termencoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8,cp1251,latin1
set fileformats=unix,dos,mac
set ls=2 " Allways show status line
set confirm
set statusline=[%l,%v\ %P%M]\ %f\ %r%h%w\ (%{&ff})\ %{fugitive#statusline()}
" Hide matches on double esc
nnoremap <esc><esc> :noh<CR>
" Use tabs to move between bracket pairs
nnoremap <tab> %
vnoremap <tab> %
" Ctrl-jklm changes to that split
map <c-j> <c-w>j
map <c-k> <c-w>k
map <c-l> <c-w>l
map <c-h> <c-w>h
" Open NerdTree
map <leader>n :NERDTreeToggle<CR>
" Remove trailing whitespace on <leader>S
nnoremap <leader>s :%s/\s\+$//<cr>:let @/=''<CR>
function! AppendModeline()
let l:modeline = printf(" vim: set ts=%d sw=%d tw=%d %set :",
\ &tabstop, &shiftwidth, &textwidth, &expandtab ? '' : 'no')
let l:modeline = substitute(&commentstring, "%s", l:modeline, "")
call append(line("$"), l:modeline)
endfunction
nnoremap <silent> <Leader>ml :call AppendModeline()<CR>
set nofoldenable
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
nnoremap <F2> :set invpaste paste?<CR>
imap <F2> <C-O>:set invpaste paste?<CR>
set pastetoggle=<F2>
map <F7> mzgg=G'z<CR>
set colorcolumn=80