This repository was archived by the owner on Jan 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_vimrc
More file actions
168 lines (130 loc) · 3.34 KB
/
_vimrc
File metadata and controls
168 lines (130 loc) · 3.34 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
" Use Vim settings rather than vi settings
set nocompatible
scriptencoding utf-8
" Change leader to a comma because the backslash is too far away
" That means all \x commands turn into ,x
" The mapleader has to be set before vundle starts loading all
" the plugins.
let mapleader="\<Space>"
" load bundled plugins
if version >= 701
execute pathogen#infect()
endif
" editor font
if has('gui_win32')
set guifont=Consolas,Consolas:h10:cDEFAULT
elseif has('gui_gtk')
set guifont=Liberation\ Mono\ 10
endif
set encoding=utf-8
" syntax highlighting on
syntax on
" window size
"set lines=69 columns=124
if has('gui_running')
set columns=124 lines=40
endif
" respect modeline
set modeline
" No tool bar in GUI
set guioptions-=T
" Show incomplete commands
set showcmd
" Show current mode
set showmode
" Visual bell, no sound
set visualbell
" wildcards
set wildmode=list:longest
set wildmenu
set wildignore=*.o,*.obj,*~
set wildignore=*.png,*.jpg,*.gif
" tab stops
set tabstop=4
set shiftwidth=4
set backspace=indent,eol,start
set smarttab
" tab switching with <ctrl><pageup> and <ctrl><pagedn>
map <C-S-PageUp> :tabprevious<CR>
map <C-S-PageDown> :tabnext<CR>
" highlight search toggle
nnoremap <silent> <C-H> :set invhlsearch<CR>
" buffer switching with <tab> and <shift>-<tab>
nnoremap <silent> <Tab> :bn<CR>
nnoremap <silent> <S-Tab> :bp<CR>
" allow switching of modified buffers by autowriting them
set autowrite
" show BufExplorer with <F12>
nnoremap <silent> <F12> :BufExplorer<CR>
" show SessionList with <F11>
nnoremap <silent> <F11> :SessionList<CR>
" easily fold and unfold
nnoremap <silent> <Leader>fe :set foldenable<CR>
nnoremap <silent> <Leader>fd :set nofoldenable<CR>
" omni completion
if has("autocmd") && exists("+omnifunc")
autocmd Filetype *
\ if &omnifunc == "" |
\ setlocal omnifunc=syntaxcomplete#Complete |
\ endif
endif
" persistent undo
if has('persistent_undo')
au BufReadPre C:/MSE/* setlocal undofile
au BufReadPre C:/home/* setlocal undofile
set undodir=C:/home/vimundo/,.
set undolevels=1000
set undoreload=10000
endif
" line numbers
set number
" colored column at 79 chars
if version >= 703
set colorcolumn=79
endif
" highlight current line, no cursor blinking
set cursorline
set guicursor=a:blinkon0
" spell checking
" set spell
" no spell checking
set nospell
" incremental search
set incsearch
" edit line always 2 lines away from edge
set scrolloff=2
" command line filename matching
set wildmode=longest,list
" auto indentation
set autoindent
set cindent
" fold method
set foldmethod=indent
set foldnestmax=3
set nofoldenable
" auto change dir to file in buffer
" set autochdir
" color scheme
"colorscheme wombat
silent! colorscheme atom
" ftplugin on - e.g. for python_flake8
filetype plugin on
filetype indent on
" status line
set laststatus=2
set statusline=[%2n]\ %<%F%=%{\"[\".(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\",B\":\"\").\"]\ \"}\ %1*%M%*%R%H\ %-19(%3l,%02c%6p%%%)
hi User1 term=inverse,bold cterm=inverse,bold ctermfg=red
" Display tabs using '▸ ' (Unicode 25B8 00A0), and
" trailing white space using ˽ (Unicode 02FD)
" Other characters :
" · (Unicode 00B7)
" ‼ (Unicode 203C)
" ▸ (Unicode 25B8)
" ˽ (Unicode 02FD)
set list
set listchars=tab:·
set listchars+=trail:˽
" ctrlp plugin
let g:ctrlp_cmd='CtrlPMixed'
" vim-markdown plugin
let g:vim_markdown_folding_disabled=1