-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
144 lines (121 loc) · 4.06 KB
/
vimrc
File metadata and controls
144 lines (121 loc) · 4.06 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
133
134
135
136
137
138
139
140
".vimrc Vundle config part
"VUNDLE START
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
"PLUGINS
Plugin 'bling/vim-airline'
Plugin 'scrooloose/nerdtree'
Plugin 'majutsushi/tagbar'
Plugin 'kien/ctrlp.vim'
"поиск в файле FIXME, TODO и т.п.
Plugin 'fisadev/FixedTaskList.vim'
"автозакрытие тегов HML/XML/и т.п.
Plugin 'tpope/vim-surround'
Plugin 'ervandew/supertab'
"Python mode
Plugin 'klen/python-mode'
Plugin 'davidhalter/jedi-vim'
Plugin 'fs111/pydoc.vim'
"Golang http://blog.gopheracademy.com/vimgo-development-environment/
Plugin 'fatih/vim-go'
Plugin 'jstemmer/gotags'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
"VUNDLE END
"VUNDLE Modules config
set t_Co=256
let g:airline#extensions#tabline#enabled = 1
"Tagbar for GO
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ }
"END VUNDLE modules
" supertab
au FileType python set omnifunc=pythoncomplete#Complete
let g:SuperTabDefaultCompletionType = "context"
set completeopt=menuone,longest,preview
"Go
"Enable goimports to automatically insert import paths instead of gofmt:
let g:go_fmt_command = "goimports"
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
"By default binaries are installed to $GOBIN or $GOPATH/bin. To change it:
"let g:go_bin_path = expand("~/.gotools")
"let g:go_bin_path = "/home/fatih/.mypath" "or give absolute path
"KEYS MAPPING"
inoremap zjk <Esc>
inoremap <C-c> <Esc>
nmap <F8> :TagbarToggle<CR>
nmap <F2> :NERDTreeToggle<CR>
"tab navigation
nnoremap <C-t> :tabnew<CR>
inoremap <C-t> <Esc>:tabnew<CR>
nnoremap <S-h> gT
nnoremap <S-l> gt
"STANDARD VIM SETTINGS
"Activate auto filetype detection
syntax on
filetype plugin indent on
filetype on
filetype plugin on
syntax enable
" http://stackoverflow.com/questions/58774/how-do-you-paste-multiple-tabbed-lines-into-vi
" set pastetoggle=<F6> " F6 toggles paste mode
set ignorecase " Don't care about case...
set smartcase " ... unless the query contains upper case characters
set autoindent " Enable automatic indenting for files with ft set
set nowrap " No fake carriage returns
set showcmd " Show command in statusline as it's being typed
set showmatch " Jump to matching bracket
set ruler " Show row,col %progress through file
set laststatus=2 " Always show filename (2 is always)
set hidden " Let us move between buffers without writing them.
" Don't :q! or :qa! frivolously!
set softtabstop=4 " Vim sees 4 spaces as a tab
set shiftwidth=4 " < and > uses spaces
set expandtab " Tabs mutate into spaces
"set foldmethod=indent " Default folding http://vim.wikia.com/wiki/Folding
set foldmethod=syntax
set backspace=indent,eol,start " Make backspace work like other editors.
" set tabstop=4 " 4-space indents
" set smarttab " <TAB> width determined by shiftwidth instead of tabstop.
set fileencoding=utf8
set fileencodings=utf8,cp1251
set hlsearch " highlight search terms
set incsearch " show search matches as you type
" http://nvie.com/posts/how-i-boosted-my-vim/
set nobackup " do not write backup and swap files
set noswapfile