forked from veged/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.vimrc
103 lines (76 loc) · 1.66 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
set nocompatible
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
filetype plugin indent on
function! ToggleMouse()
if &mouse == 'a'
set mouse=
echo "Mouse usage disabled"
else
set mouse=a
echo "Mouse usage enabled"
endif
endfunction
nnoremap <leader>m :call ToggleMouse()<CR>
" Remember last location in file
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal g'\"" | endif
endif
set backspace=indent,eol,start
set encoding=utf-8
set fileencoding=utf-8
set nobackup
set wildmenu
set title
set number
set ruler
set rulerformat=%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%)
set showcmd
set scrolljump=5
set scrolloff=3
set incsearch
set showmatch
set hlsearch
set ignorecase
set smartcase
"Clear the search highlight by pressing ENTER when in Normal mode (Typing commands)
:nnoremap <CR> :nohlsearch<CR>/<BS><CR>
set gdefault
set list listchars=tab:>·,trail:·
set nowrap
set autoindent
set smartindent
set expandtab
set shiftwidth=4
set tabstop=4
set softtabstop=4
set fileformat=unix
vnoremap < <gv
vnoremap > >gv
set pastetoggle=<leader>v
"Solarized
set t_Co=16
if has("gui_running")
set t_Co=256
let g:solarized_termcolors=256
endif
syntax enable
"call togglebg#map("<leader>b")
"FuzzyFinder
nnoremap <silent> ffb :FufBuffer<CR>
nnoremap <silent> fff :FufFile<CR>
nnoremap <silent> ffd :FufDir<CR>
nnoremap <silent> ffj :FufJumpList<CR>
" NERDTree
nmap <leader>nt :NERDTreeFind<CR>
let NERDTreeShowBookmarks=1
let NERDTreeChDirMode=0
let NERDTreeQuitOnOpen=1
let NERDTreeShowHidden=1
let NERDTreeKeepTreeInNewTab=1
command W w
command WQ wq
command Wq wq
command Wqa wqa
command Q q