-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvimrc
107 lines (74 loc) · 3.01 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
set nocompatible " don't use old settings that vi used.
" Use the newer features that vim offers
" Make the leader key be space
let mapleader = "\<Space>"
set backspace=2 " make backspace able to go over end of lines
set number " show the line number on the side
set laststatus=2 "always show the status line
set t_Co=256 "set colors to 256
set number "show line number on side
set nornu "do not make the line numbers relative to cursor
set mousehide "hide mouse cursor while typing
set showmode "display the current mode
set cursorline "highlight the current line
set backspace=2 "make backspace able to go over end of lines
set backspace=indent,eol,start "Set regular backspace during insert mode
syntax enable "use syntax highlighting
" Tab stops
set tabstop=4 " when you press tab, it will move forward
" by 4 spaces
" ----------------------------------------------------------------------
set shiftwidth=4 " the number of spaces the >>, <<, >, and <
" commands will move by will be 4
" ----------------------------------------------------------------------
set smarttab " pressing backspace on a blank indented line
" will delete the amount of spaces equal to
" shiftwidth
" Neo bundle stuff
set runtimepath+=~/.vim/bundle/neobundle.vim/
call neobundle#begin(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle (Required!)
NeoBundleFetch 'Shougo/neobundle.vim'
" Fuzzy finding for files
NeoBundle 'kien/ctrlp.vim'
"Move around easier
NeoBundle 'Lokaltog/vim-easymotion'
"File navigation
NeoBundle 'scrooloose/nerdtree'
"Coffeescript integration and syntax highlighting
NeoBundle 'kchmck/vim-coffee-script'
call neobundle#end()
filetype plugin indent on " Required:
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
" Key mappings
" space-n to open a new file (in a new tab)
nnoremap <leader>n :tabnew<cr>
" space-t to open a new tab
nnoremap <leader>t :tabnew<cr>
" <c-tab> to go to next tab
nnoremap <c-tab> :tabnext<cr>
inoremap <c-tab> <esc>:tabnext<cr>
" <c-shift-tab> to go to previous tab
nnoremap <c-s-tab> :tabprev<cr>
inoremap <c-s-tab> <esc>:tabprev<cr>
" space-f to open fuzzy file finder
nnoremap <leader>f :CtrlPClearCache<cr>:CtrlP .<cr>
" space-o to open the file browser
nnoremap <leader>o :NERDTreeToggle<cr>
" space-s to save
nnoremap <leader>s :w<cr>
" space-shift-s to save as
nnoremap <leader><s-s> :w
" space-q to quit (doesn't save, watch out!)
nnoremap <leader>q :q!<cr>
" Key mappings that might be new
" space-rv to reload vimrc
nnoremap <leader>rv :source<Space>$MYVIMRC<cr>
" space-ev to edit the vimrc file (think: edit-vim)
nnoremap <leader>ev :tabnew $MYVIMRC<cr>
" Other keymappings to make the experience less painful
"make j and k keys go up normally instead of to the previous line number
nnoremap j gj
nnoremap k gk