forked from joshimedia/MyVimRC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
73 lines (58 loc) · 1.55 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
set nocompatible
" Pathogen
call pathogen#infect()
call pathogen#helptags()
set statusline=%<\ %n:%f\ %m%r%y%=%-35.(line:\ %l\ of\ %L,\ col:\ %c%V\ (%P)%)
filetype plugin indent on
syntax on
set number
set hlsearch
set showmatch
set incsearch
set ignorecase
set nowrap
set autoindent
set history=1000
set cursorline
set expandtab
set shiftwidth=4
set tabstop=4
set softtabstop=4
" Nerdtree
autocmd vimenter * NERDTree
let NERDTreeShowBookmarks=1
let NERDTreeChDirMode=0
let NERDTreeQuitOnOpen=1
let NERDTreeMouseMode=2
let NERDTreeShowHidden=1
let NERDTreeIgnore=['\.pyc','\~$','\.swo$','\.swp$','\.git','\.hg','\.svn','\.bzr']
let NERDTreeKeepTreeInNewTab=1
let g:nerdtree_tabs_open_on_gui_startup=0
set background=dark
colorscheme wombat
inoremap jj <Esc>
nnoremap ; :
nnoremap : ;
" Strip trailing whitespace on Python, PHP, JS, SCSS, and CSS files
autocmd BufWritePre *.py :%s/\s\+$//e
autocmd BufWritePre *.php :%s/\s\+$//e
autocmd BufWritePre *.js :%s/\s\+$//e
autocmd BufWritePre *.sass :%s/\s\+$//e
autocmd BufWritePre *.css :%s/\s\+$//e
nnoremap \e :NERDTreeToggle<CR>
inoremap <C-l> <Esc>$a
nnoremap \l :setlocal number!<CR>
nnoremap \o :set paste!<CR>
" fix possible charset issue without changing charset
" let g:NERDTreeDirArrows=0
inoremap scc <Esc>m`A;<Esc>``i
nnoremap sc <Esc>m`A;<Esc>``
" More spaces for php
autocmd Filetype php setlocal ts=4 sw=4 sts=0 expandtab
" Strip Trailing Whitespace Function
" Usage :call TrimWhiteSpace()
fun! TrimWhitespace()
let l:save_cursor = getpos('.')
%s/\s\+$//e
call setpos('.', l:save_cursor)
endfun