forked from cowboy/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
54 lines (41 loc) · 1.04 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
" plugins
" - pathogen
" - sensible
" - Vim Tmux Navigator
" - nerdtree
runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
syntax on
filetype plugin indent on
" find current buffer in tree
nnoremap <leader>r :NERDTreeFind<cr>
nnoremap <leader>d :NERDTreeToggle<CR>
" view open buffers
nnoremap <leader>b :ls<cr>:b<space>
set number
set cursorline
set noswapfile
" Mouse Mode: http://usevim.com/2012/05/16/mouse/
" Enable mouse use in all modes
set mouse=a
" Send more characters for redraws
set ttyfast
set ttymouse=xterm2
" default open tabs to right and down
set splitright
set splitbelow
" function toggles
" toggle highlighting on/off
nnoremap <F4> :set hlsearch! hlsearch?<CR>
" toggle word wrap
nnoremap <F5> :set nowrap! nowrap?<CR>
" jj exits insert mode
inoremap jj <esc>
" makes vim move down a 'cursor' line for when line is word wrapped
nnoremap j gj
nnoremap k gk
cabbrev ww :w
nnoremap ; :
nnoremap : ;
" Auto-save a file when you leave insert mode
autocmd InsertLeave * if expand('%') != '' | update | endif