-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
122 lines (89 loc) · 2.69 KB
/
.vimrc
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
" General
" ~~~~~~~~~~~~~~~~
syntax on
colorscheme zenburn
set background=dark
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
set hidden
let mapleader = ","
let g:mapleader = ","
set backspace=indent,eol,start
set laststatus=2
set number
set autoindent
set smartindent
set cursorline
set listchars=tab:▸\ ,trail:⋅
set list
set incsearch
set ignorecase
set hlsearch
" set completeopt=longest,menuone
set omnifunc=syntaxcomplete#Complete
filetype plugin indent on
" Plugins
" ~~~~~~~~~~~~~~~~
call plug#begin('~/.vim/plugged')
" Interface plugins, utils, etc
" ~~~~~~~~~~~~~~~~
" navigation
Plug 'kien/ctrlp.vim'
Plug 'scrooloose/nerdtree'
" editing
Plug 'tpope/vim-commentary'
Plug 'ervandew/supertab'
Plug 'Raimondi/delimitMate'
Plug 'docunext/closetag.vim'
" ui
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'bling/vim-bufferline'
call plug#end()
" Mappings
" ~~~~~~~~~~~~~~~~
nmap <silent> <leader>x :x<cr>
nmap <silent> <leader>s :w<cr>
nmap <silent> <leader>q :q<cr>
nmap <silent> <leader>t :NERDTreeToggle<cr>
nmap <silent> <leader>m :CtrlPMRUFiles<cr>
nmap <silent> <leader>r :CtrlPBuffer<cr>
" buffers
noremap <silent> <c-l> :bn!<cr>
noremap <silent> <c-h> :bp!<cr>
nmap <Enter> o<ESC>
nmap Ò mzgg=G`z
noremap <silent> ; :nohlsearch<CR>
imap <c-@> <c-space>
" Moving line
nnoremap Ô :m .+1<cr>==
nnoremap :m .-2<cr>==
inoremap Ô <Esc>:m .+1<cr>==gi
inoremap <Esc>:m .-2<cr>==gi
vnoremap Ô :m '>+1<cr>gv=gv
vnoremap :m '<-2<cr>gv=gv
let g:closetag_html_style=1
let g:NERDTreeWinSize=40
" let g:SuperTabDefaultCompletionType = 'context'
let g:SuperTabCrMapping=1
let g:SuperTabMappingForward = '<c-space>'
let g:SuperTabMappingBackward = '<s-c-space>'
let g:SuperTabCompletionContexts = ['s:ContextText', 's:ContextDiscover']
let g:SuperTabContextTextOmniPrecedence = ['&omnifunc', '&completefunc']
let g:SuperTabContextDiscoverDiscovery = ["&completefunc:<c-x><c-u>", "&omnifunc:<c-x><c-o>"]
let g:ctrlp_map='<leader>e'
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
" Indentation
vmap <S-Tab> <gv
vmap <Tab> >gv
nmap <S-Tab> <<
nmap <Tab> >>
let g:airline_theme = 'base16'
" Turns on/off the expansion of <CR>
let delimitMate_expand_cr=1
let delimitMate_jump_expansion=1
" Custom tabwidth for coffeescript files
au FileType coffee setl ts=2 sw=2 et
au FileType stylus setl ts=2 sw=2 et
" Set javascript syntax in jsp files by default
au BufRead,BufNewFile *.jsp set syntax=javascript
set langmap=ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕHГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.~QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<>