forked from JamesTryand/vimfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
100 lines (72 loc) · 2.13 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
"
" My .vimrc file
"
" Making an attempt clean and document my vimfile
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'scrooloose/nerdtree'
Bundle 'molokai'
Bundle 'gabemc/powershell-vim'
"----------------------------------------------------------
" OS specific configuration
"----------------------------------------------------------
if has("win32")
set directory=$TEMP
elseif has("unix")
set directory=/tmp
endif
" enable file type detection
filetype on
filetype plugin on
filetype indent on
" tabstops are 4 spaces
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set autoindent
" allows modified buffers to be hidden
set hidden
" not sure why I wouldn't ever want syntax on
syntax on
colorscheme molokai
" don't need to be vi compatible. We're not in the 60's anymore
set nocompatible
set nostartofline
set scrolloff=4
set listchars=tab:?\ ,eol:¬,trail:.
" show invisible characters like tabstops
set list
set wildmode=list:longest "make tab completion complete with common chars
set nobackup
set nowritebackup
" regex stuff. show the matches and search without case sensitivity
set showmatch
set ignorecase
set guifont=Consolas:h11
" set custom file types I've configured
autocmd BufNewFile,BufRead *.ps1 setf ps1
autocmd BufNewFile,BufRead *.psm1 setf ps1
autocmd BufNewFile,BufRead *.config setf xml
"----------------------------------------------------------
" NERD Tree plugin settings
"----------------------------------------------------------
" toggle NERD Tree with CTRL N
nmap <silent> <c-n> :NERDTreeToggle<cr>
" Let's make it easy to edit this file (mnemonic for the key sequence is
" 'e'dit 'v'imrc)
nmap <silent> ,ev :e $MYVIMRC<cr>
" And to source this file as well (mnemonic for the key sequence is
" 's'ource 'v'imrc)
nmap <silent> ,sv :so $MYVIMRC<cr>
imap jj <esc>
nmap j gj
nmap k gk
"----------------------------------------------------------
" status line stuff
"----------------------------------------------------------
set laststatus=2
if has("statusline")
set statusline=%<%f\ %h%m%r%=%k[%{(&fenc\ ==\ \"\"?&enc:&fenc).(&bomb?\",BOM\":\"\")}]\ %-12.(%l,%c%V%)\ %P
endif