-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvimrc-docker
161 lines (123 loc) · 4.31 KB
/
vimrc-docker
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PATHOGEN SETUP "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
filetype off
execute pathogen#infect()
filetype plugin indent on " load filetype-specific indent files
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" STANDARD VIM SETTIGNS "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
syntax on
colorscheme solarized
set autoindent " enable automatic indentation
set cursorline " highlight current line
set expandtab
set hlsearch " highlight search results
set ignorecase " case insensitive search
set incsearch
set list " Show `listchars` characters
set nofoldenable
set number " show line numbers
set ruler
set showcmd " show command in bottom bar
set showmatch " highlight matching [{()}]
set smartcase " use case sensitive search if a capital letter is used
set warn " show current mode
set wildmenu " visual autocomplete for command menu
set hidden
set backspace=indent,eol,start
set cc=81,121
set fillchars+=vert:\
set foldlevel=10
set laststatus=2
set listchars=tab:=»,trail:·
set mouse=a
set pastetoggle=<F2>
set shiftwidth=2
set t_Co=256
set tabstop=2
set textwidth=120
set bg=dark
" Jump to the previous location when opening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" MAPPINGS
""""""""""""""""""""""""""""""""""""""""
map Y y$
inoremap <Nul> <C-n>
" System's clipboard integration
map <leader>p "+p
map <leader>y "+y
nmap <Leader>l :bnext<CR>
nmap <Leader>h :bprevious<CR>
"nnoremap <esc> :noh<return><esc>
:noremap <Space>n :cnext<C-m>
:noremap <Space>p :cprev<C-m>
:noremap <Space>bn :bnext<CR>
:noremap <Space>bp :bprevious<CR>
:nnoremap <F5> :buffers<CR>:buffer<Space>
" HIGHLIGHTS
""""""""""""""""""""""""""""""""""""""""
hi clear VertSplit
hi clear SignColumn
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PLUGIN SETTINGS "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Tag Bar
""""""""""""""""""""""""""""""""""""""""
nmap <F8> :TagbarToggle<CR>
" NERDTree
""""""""""""""""""""""""""""""""""""""""
nmap <leader>f :NERDTreeToggle
nmap <leader>F :NERDTreeFind
let g:NERDTreeWinSize = 42
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
" Ctrl-P
""""""""""""""""""""""""""""""""""""""""
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_match_window = 'bottom,order:ttb,min:3,max:10,results:50'
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
let g:ctrlp_custom_ignore = '\v[\/](node_modules)$'
" Multi cursor
""""""""""""""""""""""""""""""""""""""""
let g:multi_cursor_next_key = '<C-n>'
let g:multi_cursor_prev_key = '<C-S-p>'
let g:multi_cursor_skip_key = '<C-x>'
let g:multi_cursor_quit_key = '<Esc>'
" UltiSnip
""""""""""""""""""""""""""""""""""""""""
"let g:UltiSnipsExpandTrigger = "<c-j>"
" Tabularize
""""""""""""""""""""""""""""""""""""""""
nmap <Leader>== :Tabularize /=<CR>
vmap <Leader>== :Tabularize /=<CR>
" Airline
""""""""""""""""""""""""""""""""""""""""
let g:airline_theme = 'solarized'
" Enable the list of buffers
let g:airline#extensions#tabline#enabled = 1
" Show just the filename
let g:airline#extensions#tabline#fnamemod = ':t'
let g:airline_powerline_fonts = 1
" GitGutter
""""""""""""""""""""""""""""""""""""""""
let g:gitgutter_sign_column_always = 1
" LimeLight
""""""""""""""""""""""""""""""""""""""""
let g:limelight_conceal_ctermfg = 0
" NeoComplete
""""""""""""""""""""""""""""""""""""""""
"let g:neocomplete#enable_at_startup = 1
"let g:neocomplete#enable_smart_case = 1
"let g:neocomplete#sources#syntax#min_keyword_length = 5
" YCM
""""""""""""""""""""""""""""""""""""""""
"let g:ycm_min_num_of_chars_for_completion = 2
" RSpec.vim mappings
""""""""""""""""""""""""""""""""""""""""
map <Leader>t :call RunCurrentSpecFile()<CR>
map <Leader>s :call RunNearestSpec()<CR>
map <Leader>l :call RunLastSpec()<CR>
map <Leader>a :call RunAllSpecs()<CR>