annotate vimrc @ 26:0bf5f68cf4f9

Add rbenv plugin and sessions
author zegervdv <zegervdv@me.com>
date Fri, 28 Mar 2014 11:47:49 +0100
parents 5a413a3bd077
children d75ec1f32cae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
1 set nocompatible
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
2 set laststatus=2
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
3 set noshowmode
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
4
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
5 execute pathogen#infect()
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
6
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
7 set backspace=2
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
8 set autowrite
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
9
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
10 set vb
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
11 set guioptions-=r
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
12 set guioptions-=l
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
13 set guioptions-=R
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
14 set guioptions-=L
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
15
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
16 syntax on
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
17 set expandtab
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
18 set number
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
19 set ruler
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
20 set nocursorline
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
21 set showmatch
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
22 set title
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
23 set wrap
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
24 set wrapmargin=2
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
25 set linebreak
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
26 set lbr
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
27 set tabstop=2 shiftwidth=2
21
bf5c5093bad9 Add Base16-Ocean-Dark colorscheme
zegervdv <zegervdv@me.com>
parents: 19
diff changeset
28 if has("gui_running")
bf5c5093bad9 Add Base16-Ocean-Dark colorscheme
zegervdv <zegervdv@me.com>
parents: 19
diff changeset
29 set background=dark
22
b2c16cd71d95 Add math plugin
zegervdv <zegervdv@me.com>
parents: 21
diff changeset
30 color hybrid
21
bf5c5093bad9 Add Base16-Ocean-Dark colorscheme
zegervdv <zegervdv@me.com>
parents: 19
diff changeset
31 else
bf5c5093bad9 Add Base16-Ocean-Dark colorscheme
zegervdv <zegervdv@me.com>
parents: 19
diff changeset
32 color hybrid
bf5c5093bad9 Add Base16-Ocean-Dark colorscheme
zegervdv <zegervdv@me.com>
parents: 19
diff changeset
33 endif
0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
34 set guifont=Inconsolata\ for\ Powerline:h12
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
35 set autowrite
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
36 set hidden
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
37 set hlsearch
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
38 set incsearch
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
39 set ignorecase
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
40 set smartcase
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
41 set smartindent
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
42 set autoindent
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
43 set scrolloff=4
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
44 set textwidth=80
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
45
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
46 set history=100
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
47 set wildmenu
19
4ee5a11d8355 Improvements
zegervdv <zegervdv@me.com>
parents: 18
diff changeset
48 set wildmode=full
0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
49
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
50 set diffopt+=iwhite
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
51
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
52 set formatoptions=
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
53 set formatoptions+=c " Format comments
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
54 set formatoptions+=r " Continue comments by default
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
55 set formatoptions+=o " Make comment when using o or O from comment line
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
56 set formatoptions+=q " Format comments with gq
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
57 set formatoptions+=n " Recognize numbered lists
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
58 set formatoptions+=2 " Use indent from 2nd line of a paragraph
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
59 set formatoptions+=l " Don't break lines that are already long
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
60 set formatoptions+=1 " Break before 1-letter words
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
61
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
62 set splitright
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
63 set virtualedit=block
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
64 set conceallevel=0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
65
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
66 set cryptmethod=blowfish
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
67
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
68 filetype plugin indent on
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
69 autocmd FileType ruby set tabstop=2|set shiftwidth=2
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
70
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
71 set clipboard=unnamed
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
72
16
17afab9bd228 Open vim at last known position
zegervdv <zegervdv@me.com>
parents: 14
diff changeset
73 set viminfo='10,\"100,:20,%,n~/.viminfo
17afab9bd228 Open vim at last known position
zegervdv <zegervdv@me.com>
parents: 14
diff changeset
74
17afab9bd228 Open vim at last known position
zegervdv <zegervdv@me.com>
parents: 14
diff changeset
75 " When editing a file, always jump to the last known cursor position.
17afab9bd228 Open vim at last known position
zegervdv <zegervdv@me.com>
parents: 14
diff changeset
76 " Don't do it for commit messages, when the position is invalid, or when
17afab9bd228 Open vim at last known position
zegervdv <zegervdv@me.com>
parents: 14
diff changeset
77 " inside an event handler (happens when dropping a file on gvim).
17afab9bd228 Open vim at last known position
zegervdv <zegervdv@me.com>
parents: 14
diff changeset
78 autocmd BufReadPost *
17afab9bd228 Open vim at last known position
zegervdv <zegervdv@me.com>
parents: 14
diff changeset
79 \ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") |
17afab9bd228 Open vim at last known position
zegervdv <zegervdv@me.com>
parents: 14
diff changeset
80 \ exe "normal g`\"" |
17afab9bd228 Open vim at last known position
zegervdv <zegervdv@me.com>
parents: 14
diff changeset
81 \ endif
0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
82
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
83 map <Leader>d :bp<bar>sp<bar>bn<bar>bd<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
84
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
85 " See long lines as line breaks
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
86 map j gj
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
87 map k gk
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
88
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
89 " remap tag-search to better place
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
90 nmap <C-$> <C-]>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
91
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
92 " Jump to end of line in insert mode
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
93 inoremap <C-e> <C-o>A
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
94
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
95 " Jump one character in insert mode
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
96 inoremap <C-f> <C-o>l
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
97
4
050d4d8c6796 Vim: use double space to alternate files
zegervdv <zegervdv@me.com>
parents: 3
diff changeset
98 " Switch between the last two files
050d4d8c6796 Vim: use double space to alternate files
zegervdv <zegervdv@me.com>
parents: 3
diff changeset
99 nnoremap <SPACE><SPACE> <C-^>
050d4d8c6796 Vim: use double space to alternate files
zegervdv <zegervdv@me.com>
parents: 3
diff changeset
100
0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
101 " Very Magic search patterns
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
102 nmap / /\v
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
103 cmap s/ s/\v
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
104
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
105
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
106 inoremap £ \
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
107
4
050d4d8c6796 Vim: use double space to alternate files
zegervdv <zegervdv@me.com>
parents: 3
diff changeset
108 " nnoremap <SPACE> <C-e>
0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
109
24
c3bb025ed67e Update plugins
zegervdv <zegervdv@me.com>
parents: 23
diff changeset
110
0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
111 " Close Quickfix window (,qq)
5
8975f7375c41 Use ag with ctrl-p
zegervdv <zegervdv@me.com>
parents: 4
diff changeset
112 " map <leader>qq :cclose<CR>
0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
113
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
114 nnoremap <silent> n n:call HLNext(0.4)<cr>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
115 nnoremap <silent> N N:call HLNext(0.4)<cr>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
116
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
117 function! HLNext (blinktime)
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
118 highlight WhiteOnRed ctermfg=white ctermbg=red guifg=white guibg=red
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
119 let [bufnum, lnum, col, off] = getpos('.')
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
120 let matchlen = strlen(matchstr(strpart(getline('.'),col-1),@/))
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
121 let target_pat = '\c\%#'.@/
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
122 let ring = matchadd('WhiteOnRed', target_pat, 101)
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
123 redraw
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
124 exec 'sleep ' . float2nr(a:blinktime * 1000) . 'm'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
125 call matchdelete(ring)
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
126 redraw
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
127 endfunction
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
128
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
129 " Swap v and CTRL-V
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
130 nnoremap v <C-V>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
131 nnoremap <C-V> v
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
132
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
133 vnoremap v <C-V>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
134 vnoremap <C-V> v
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
135
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
136 " Use backspace as delete in visual mode
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
137 vmap <BS> x
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
138
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
139 " Keep selection when shifting
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
140 vmap <expr> > KeepVisualSelection(">")
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
141 vmap <expr> < KeepVisualSelection("<")
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
142
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
143 function! KeepVisualSelection(cmd)
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
144 set nosmartindent
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
145 if mode() ==# "V"
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
146 return a:cmd . ":set smartindent\<CR>gv"
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
147 else
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
148 return a:cmd . ":set smartindent\<CR>"
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
149 endif
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
150 endfunction
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
151
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
152 let g:indent_guides_auto_colors = 0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
153 let g:indent_guides_guide_size = 1
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
154 highlight IndentGuidesEven guibg=background
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
155 highlight IndentGuidesOdd guibg='#282a2e'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
156
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
157 " Show trailing whitespaces
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
158 " exec "set listchars=tab:\uBB\uBB,trail:\uB7,nbsp:~"
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
159 " set list
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
160
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
161 " Vim Math plugin; make simple calculations
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
162 vmap <expr> ++ VMATH_YankAndAnalyse()
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
163 nmap ++ vip++
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
164
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
165 " Airline configuration
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
166 let g:airline_inactive_collapse=0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
167 let g:airline_powerline_fonts=1
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
168
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
169 let g:airline_left_sep = ''
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
170 let g:airline_right_sep = ''
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
171
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
172 let g:airline_theme = 'tomorrow'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
173
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
174 let g:airline#extensions#syntastic#enabled = 0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
175
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
176 nnoremap <F5> :buffers<CR>:buffer<Space>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
177 noremap <C-TAB> <C-w><C-w>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
178
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
179 " Set leader to ,
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
180 let mapleader = ","
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
181
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
182 " Custom key mappings
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
183
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
184 let g:yankring_replace_n_pkey = 'cp'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
185
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
186 " Nerdtree
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
187 map <F2> :NERDTreeToggle<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
188 map <Leader>e :NERDTreeToggle<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
189 let NERDTreeIgnore = ['\.aux$', '\.log$', '\.out$']
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
190
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
191 " Vim - Rspec
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
192 map <leader>t :call RunCurrentSpecFile()<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
193 map <leader>s :call RunNearestSpec()<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
194 map <leader>l :call RunLastSpec()<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
195 map <leader>r :call RunAllSpecs()<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
196
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
197 " Cucumber
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
198 map <leader>f :call RunAllFeatures()<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
199 map <leader>k :call RunCurrentFeature()<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
200
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
201 " Autocomplete
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
202 inoremap <C-Space> <C-N>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
203
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
204 " Single char insertion
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
205 " nmap <Space> i_<Esc>r
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
206
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
207 " Clear highlight
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
208 nnoremap <silent> <leader>n :nohlsearch<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
209
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
210 " ctrl p - Fuzzy file finder
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
211 noremap <C-p> :CtrlP<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
212 let g:ctrl_map = '<c-p>'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
213 let g:ctrl_cmd = 'CtrlP'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
214
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
215 map <C-l> :CtrlPBuffer<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
216 map <C-m> :CtrlPTag<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
217
5
8975f7375c41 Use ag with ctrl-p
zegervdv <zegervdv@me.com>
parents: 4
diff changeset
218 if executable('ag')
8975f7375c41 Use ag with ctrl-p
zegervdv <zegervdv@me.com>
parents: 4
diff changeset
219 let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
8975f7375c41 Use ag with ctrl-p
zegervdv <zegervdv@me.com>
parents: 4
diff changeset
220 let g:ctrlp_use_caching = 0
8975f7375c41 Use ag with ctrl-p
zegervdv <zegervdv@me.com>
parents: 4
diff changeset
221 endif
8975f7375c41 Use ag with ctrl-p
zegervdv <zegervdv@me.com>
parents: 4
diff changeset
222
0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
223 " ctrl p - Commands
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
224 map <leader>p :CtrlPCmdPalette<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
225
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
226 " Markdown
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
227 let g:vim_markdown_folding_disabled=1
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
228
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
229 " tComment remap
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
230 nmap <leader>c <C-_><C-_>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
231
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
232 " Neo Complete
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
233 let g:acp_enableAtStartup=0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
234 let g:neocomplete#enable_at_startup=1
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
235 let g:neocomplete#enable_smart_case=1
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
236 let g:neocomplete#sources#syntax#min_keyword_length=3
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
237 let g:neocomplete#lock_buffer_name_pattern = '\*ku\*'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
238
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
239 " Define dictionary.
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
240 let g:neocomplete#sources#dictionary#dictionaries = {
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
241 \ 'default' : '',
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
242 \ 'vimshell' : $HOME.'/.vimshell_hist',
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
243 \ 'scheme' : $HOME.'/.gosh_completions'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
244 \ }
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
245 " Recommended key-mappings.
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
246 " <CR>: close popup and save indent.
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
247 inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
248 function! s:my_cr_function()
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
249 return neocomplete#close_popup() . "\<CR>"
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
250 " For no inserting <CR> key.
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
251 "return pumvisible() ? neocomplete#close_popup() : "\<CR>"
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
252 endfunction
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
253 " <TAB>: completion.
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
254 inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
255 " <C-h>, <BS>: close popup and delete backword char.
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
256 inoremap <expr><C-h> neocomplete#smart_close_popup()."\<C-h>"
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
257
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
258 autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
259 autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
260 autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
261 autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
262 autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
263 autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
264 if !exists('g:neocomplete#sources#omni#input_patterns')
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
265 let g:neocomplete#sources#omni#input_patterns = {}
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
266 endif
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
267
26
0bf5f68cf4f9 Add rbenv plugin and sessions
zegervdv <zegervdv@me.com>
parents: 25
diff changeset
268 " autocmd FileType c NeoCompleteTagMakeCache
24
c3bb025ed67e Update plugins
zegervdv <zegervdv@me.com>
parents: 23
diff changeset
269
0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
270 " Neo Snippets
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
271 imap <C-k> <Plug>(neosnippet_expand_or_jump)
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
272 smap <C-k> <Plug>(neosnippet_expand_or_jump)
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
273 xmap <C-k> <Plug>(neosnippet_expand_target)
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
274
23
4112c6eb9f47 Correct tab completion with snippets
zegervdv <zegervdv@me.com>
parents: 22
diff changeset
275 " imap <expr><TAB> neosnippet#expandable_or_jumpable() ?
4112c6eb9f47 Correct tab completion with snippets
zegervdv <zegervdv@me.com>
parents: 22
diff changeset
276 " \ "\<Plug>(neosnippet_expand_or_jump)"
4112c6eb9f47 Correct tab completion with snippets
zegervdv <zegervdv@me.com>
parents: 22
diff changeset
277 " \: pumvisible() ? "\<C-n>" : "\<TAB>"
4112c6eb9f47 Correct tab completion with snippets
zegervdv <zegervdv@me.com>
parents: 22
diff changeset
278 " smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
4112c6eb9f47 Correct tab completion with snippets
zegervdv <zegervdv@me.com>
parents: 22
diff changeset
279 " \ "\<Plug>(neosnippet_expand_or_jump)"
4112c6eb9f47 Correct tab completion with snippets
zegervdv <zegervdv@me.com>
parents: 22
diff changeset
280 " \: "\<TAB>"
4112c6eb9f47 Correct tab completion with snippets
zegervdv <zegervdv@me.com>
parents: 22
diff changeset
281
4112c6eb9f47 Correct tab completion with snippets
zegervdv <zegervdv@me.com>
parents: 22
diff changeset
282
4112c6eb9f47 Correct tab completion with snippets
zegervdv <zegervdv@me.com>
parents: 22
diff changeset
283 imap <expr><TAB> neosnippet#expandable() == 1 ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<C-n>" : "\<TAB>"
4112c6eb9f47 Correct tab completion with snippets
zegervdv <zegervdv@me.com>
parents: 22
diff changeset
284 imap <expr><C-k> neosnippet#expandable_or_jumpable() == 1 ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<C-n>" : "\<TAB>"
4112c6eb9f47 Correct tab completion with snippets
zegervdv <zegervdv@me.com>
parents: 22
diff changeset
285 smap <expr><TAB> neosnippet#expandable() == 1 ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<C-n>" : "\<TAB>"
0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
286 let g:neocomplete#sources#omni#input_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
287
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
288 let g:neosnippet#snippets_directory='~/.vim/snippets'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
289
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
290 " Tabular
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
291 inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
292
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
293 function! s:align()
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
294 let p = '^\s*|\s.*\s|\s*$'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
295 if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
296 let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
297 let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
298 Tabularize/|/l1
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
299 normal! 0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
300 call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
301 endif
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
302 endfunction
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
303
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
304 " Align Migration files
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
305 vmap <c-a> :Tabularize /:/l1l0l0<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
306
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
307 nmap <Leader>a= :Tabularize /=<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
308 vmap <Leader>a= :Tabularize /=<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
309 nmap <Leader>a=> :Tabularize /=><CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
310 vmap <Leader>a=> :Tabularize /=><CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
311 nmap <Leader>a: :Tabularize /:\zs/l0l1<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
312 vmap <Leader>a: :Tabularize /:\zs/l0l1<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
313 nmap <Leader>a, :Tabularize /,\zs/l0l1<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
314 vmap <Leader>a, :Tabularize /,\zs/l0l1<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
315 vmap <Leader>a- :Tabularize /-<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
316
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
317
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
318
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
319 augroup markdown
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
320 au!
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
321 au BufNewFile,BufRead *.md,*.markdown setlocal filetype=ghmarkdown
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
322 augroup END
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
323
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
324
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
325 " Latex plugin
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
326 au BufNewFile,BufRead,BufEnter *.tex setlocal spell spelllang=en_gb
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
327 au BufNewFile,BufRead,BufEnter *.tex setlocal textwidth=0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
328 au BufNewFile,BufRead,BufEnter *.txt setlocal spell spelllang=en_gb
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
329 au BufNewFile,BufRead,BufEnter *.txt setlocal textwidth=0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
330
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
331 let g:tex_conseal = ""
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
332
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
333 let g:tex_comment_nospell=1
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
334 let g:Tex_DefaultTargetFormat = 'pdf'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
335 let g:tex_flavor = 'latex'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
336 let g:Tex_TreatMacViewerAsUNIX = 1
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
337 let g:Tex_ExecuterUNIXViewerInForeground = 1
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
338 let g:Tex_ViewRule_pdf = 'open -a Preview'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
339 let g:Tex_ViewRule_ps = 'open -a Preview'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
340
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
341 " Tagbar mapping
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
342 nmap <F8> :TagbarToggle<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
343
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
344 " The silver searcher
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
345 " let g:ackprg = 'ag --nogroup --nocolor --column'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
346
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
347 " Multiple cursor insert
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
348 let g:multi_cursor_next_key='<C-n>'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
349 let g:multi_cursor_prev_key='<C-m>'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
350 let g:multi_cursor_skip_key='<C-x>'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
351 let g:multi_cursor_quit_key='<Esc>'
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
352
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
353 " Gundo tree
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
354 nnoremap <leader>u :GundoToggle<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
355
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
356 " Yank ring
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
357 nnoremap <silent> <leader>y :YRShow<CR>
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
358
13
dd1519fc21e3 Add vim-smalls plugin
zegervdv <zegervdv@me.com>
parents: 5
diff changeset
359 " Open pdf in Preview
0
36a9b3a28861 Add all dotfiles
zegervdv <zegervdv@me.com>
parents:
diff changeset
360 let g:livepreview_previewer = 'open -a Preview'
3
44d3af8838f8 Add support for local zshrc and vimrc files
zegervdv <zegervdv@me.com>
parents: 0
diff changeset
361
13
dd1519fc21e3 Add vim-smalls plugin
zegervdv <zegervdv@me.com>
parents: 5
diff changeset
362
dd1519fc21e3 Add vim-smalls plugin
zegervdv <zegervdv@me.com>
parents: 5
diff changeset
363 " Smalls
dd1519fc21e3 Add vim-smalls plugin
zegervdv <zegervdv@me.com>
parents: 5
diff changeset
364 nmap s <Plug>(smalls)
dd1519fc21e3 Add vim-smalls plugin
zegervdv <zegervdv@me.com>
parents: 5
diff changeset
365 omap s <Plug>(smalls)
dd1519fc21e3 Add vim-smalls plugin
zegervdv <zegervdv@me.com>
parents: 5
diff changeset
366 xmap s <Plug>(smalls)
dd1519fc21e3 Add vim-smalls plugin
zegervdv <zegervdv@me.com>
parents: 5
diff changeset
367
14
09c60bc0fc38 Add vim-textmanip for visual block dragging
zegervdv <zegervdv@me.com>
parents: 13
diff changeset
368 " Textmanip
09c60bc0fc38 Add vim-textmanip for visual block dragging
zegervdv <zegervdv@me.com>
parents: 13
diff changeset
369 xmap <C-j> <Plug>(textmanip-move-down)
09c60bc0fc38 Add vim-textmanip for visual block dragging
zegervdv <zegervdv@me.com>
parents: 13
diff changeset
370 xmap <C-k> <Plug>(textmanip-move-up)
09c60bc0fc38 Add vim-textmanip for visual block dragging
zegervdv <zegervdv@me.com>
parents: 13
diff changeset
371 xmap <C-h> <Plug>(textmanip-move-left)
09c60bc0fc38 Add vim-textmanip for visual block dragging
zegervdv <zegervdv@me.com>
parents: 13
diff changeset
372 xmap <C-l> <Plug>(textmanip-move-right)
09c60bc0fc38 Add vim-textmanip for visual block dragging
zegervdv <zegervdv@me.com>
parents: 13
diff changeset
373 xmap <F10> <Plug>(textmanip-toggle-mode)
09c60bc0fc38 Add vim-textmanip for visual block dragging
zegervdv <zegervdv@me.com>
parents: 13
diff changeset
374
13
dd1519fc21e3 Add vim-smalls plugin
zegervdv <zegervdv@me.com>
parents: 5
diff changeset
375 " Load local vimrc
3
44d3af8838f8 Add support for local zshrc and vimrc files
zegervdv <zegervdv@me.com>
parents: 0
diff changeset
376 if filereadable($HOME . "/.vimrc.local")
44d3af8838f8 Add support for local zshrc and vimrc files
zegervdv <zegervdv@me.com>
parents: 0
diff changeset
377 source ~/.vimrc.local
44d3af8838f8 Add support for local zshrc and vimrc files
zegervdv <zegervdv@me.com>
parents: 0
diff changeset
378 endif
24
c3bb025ed67e Update plugins
zegervdv <zegervdv@me.com>
parents: 23
diff changeset
379
c3bb025ed67e Update plugins
zegervdv <zegervdv@me.com>
parents: 23
diff changeset
380 nnoremap <Enter> o<ESC>
25
5a413a3bd077 Add vim-startify plugin
zegervdv <zegervdv@me.com>
parents: 24
diff changeset
381
5a413a3bd077 Add vim-startify plugin
zegervdv <zegervdv@me.com>
parents: 24
diff changeset
382
5a413a3bd077 Add vim-startify plugin
zegervdv <zegervdv@me.com>
parents: 24
diff changeset
383 let g:startify_session_dir = "~/.vim/sessions"