-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
103 lines (91 loc) · 3.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
101
102
103
set nocompatible
set nowrap " don't wrap lines
set tabstop=4 " a tab is four spaces
set backspace=indent,eol,start
" allow backspacing over everything in insert mode
set autoindent " always set autoindenting on
set copyindent " copy the previous indentation on autoindenting
set number " always show line numbers
set shiftwidth=4 " number of spaces to use for autoindenting
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
set showmatch " set show matching parenthesis
set ignorecase " ignore case when searching
set smartcase " ignore case if search pattern is all lowercase,
" case-sensitive otherwise
set smarttab " insert tabs on the start of a line according to
" shiftwidth, not tabstop
set hlsearch " highlight search terms
set incsearch " show search matches as you type
set guioptions=ac
set vb
set ch=2
filetype on
filetype plugin on
filetype indent on
set showmode
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v][%p%%]\ buf:\ #%n\ [%b][0x%B]
set list
set laststatus=2
set listchars=tab:>.,trail:.,extends:#,nbsp:.
set history=1000 " remember more commands and search history
set undolevels=1000 " use many muchos levels of undo
set hlsearch
if v:version >= 730
set undofile " keep a persistent backup file
set undodir=~/.vim/.undo,~/tmp,/tmp
endif
set nobackup " do not keep backup files, it's 70's style cluttering
set noswapfile " do not write annoying intermediate swap files,
"set lines=50 columns=150 " restore from swap files anyway?
if has("gui_running")
" GUI is running or is about to start.
set lines=999 columns=999 " Maximize gvim window.
set guifont=Menlo:h14 " increase font size for gui
else
" This is console Vim.
if exists("+lines")
set lines=50
endif
if exists("+columns")
set columns=100
endif
endif
" Highlighting {{{
if &t_Co >= 256 || has("gui_running")
colorscheme molokai
endif
if &t_Co > 2 || has("gui_running")
syntax on " switch syntax highlighting on, when the terminal has colors
endif
" }}}
" Store the bookmarks file
let NERDTreeBookmarksFile=expand("$HOME/.vim/NERDTreeBookmarks")
" Show the bookmarks table on startup
let NERDTreeShowBookmarks=1
" Show hidden files, too
let NERDTreeShowFiles=1
let NERDTreeShowHidden=1
" Quit on opening files from the tree
"let NERDTreeQuitOnOpen=0
" Highlight the selected entry in the tree
let NERDTreeHighlightCursorline=1
" Use a single click to fold/unfold directories and a double click to open
" files
let NERDTreeMouseMode=2
" Don't display these kinds of files
let NERDTreeIgnore=[ '\.pyc$', '\.pyo$', '\.py\$class$', '\.obj$',
\ '\.o$', '\.so$', '\.egg$', '^\.git$', '\.DS_Store' ]
let NERDTreePosition = 'left'
"autocmd VimEnter * NERDTree
" }}}
if has("autocmd")
autocmd bufwritepost .vimrc source $MYVIMRC
endif
noremap <Up> ""
noremap! <Up> <Esc>
noremap <Down> ""
noremap! <Down> <Esc>
noremap <Left> ""
noremap! <Left> <Esc>
noremap <Right> ""
noremap! <Right> <Esc>