-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
113 lines (88 loc) · 1.99 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
filetype off
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
" enable everything vim has to offer :)
set nocompatible
set modelines=0
set encoding=utf-8
" force reload filetype for pathogen use.
filetype off
filetype plugin indent on
call pathogen#runtime_append_all_bundles()
" only dark bg in terminals
if !has("gui_running")
set background=dark
set mouse=
end
syntax on
" death to hard tabs
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set autoindent
" don't unindent # comments
inoremap # X#
" leader
let mapleader=","
"searching/moving
nnoremap / /\v
vnoremap / /\v
set ignorecase
set smartcase
set incsearch
set showmatch
set hlsearch
" remove search highlight
nnoremap <leader><space> :noh<cr>
" move around brackets with TAB
nnoremap <tab> %
vnoremap <tab> %
" switch between two windows with <leader>+"."
nnoremap <leader>. w
" move to windows using <leader>+direction
nnoremap <leader>h h
nnoremap <leader>l l
nnoremap <leader>j j
nnoremap <leader>k k
" long lines
set wrap
" make up and down go by screen lines instead of file lines
nnoremap j gj
nnoremap k gk
" disable cursor keys
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
" make ; behave as :
nnoremap ; :
vnoremap ; :
" map F1 to ESC :)
inoremap <F1> <ESC>
nnoremap <F1> <ESC>
vnoremap <F1> <ESC>
set guifont=Terminus\ 10
" load session file if present in the current dir
" and vim was invoked w/o args.
if argc() == 0
execute 'silent! source Session.vim'
end
" NERDTree mappings
nnoremap <F3> :NERDTree<cr>
nnoremap <F4> :NERDTreeMirror<cr>
nnoremap <leader><F3> :NERDTreeClose<cr>
colorscheme torte
" turn off all bells, visual or audible
set vb t_vb=
" simplify edit/reload vimrc
nnoremap <leader>ev :tabedit $MYVIMRC<cr>
nnoremap <leader>rv :so $MYVIMRC<cr>
" open / close tabs
nnoremap <leader>tn :tabnew<cr>
nnoremap <leader>tc :tabclose<cr>