-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
65 lines (54 loc) · 1.8 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
let mapleader=","
set pastetoggle=<leader>p "turn off paste-munging features w/ hotkey
nnoremap <c-j> 5j
nnoremap <c-k> 5k
colo zenburn
"nnoremap ; :
syntax on "enable syntax highlighting
set hidden
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set softtabstop=4
set autoindent
"set number "always show line numbers
set ignorecase
set smartcase
set hlsearch
set incsearch
set wildignore=*.pyc,*.class
set visualbell
set noerrorbells
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
set ls=2 " Always show status line
if has('statusline')
" Status line detail:
" %f file path
" %y file type between braces (if defined)
" %([%R%M]%) read-only, modified and modifiable flags between braces
" %{'!'[&ff=='default_file_format']}
" shows a '!' if the file format is not the platform
" default
" %{'$'[!&list]} shows a '*' if in list mode
" %{'~'[&pm=='']} shows a '~' if in patchmode
" (%{synIDattr(synID(line('.'),col('.'),0),'name')})
" only for debug : display the current syntax item name
" %= right-align following items
" #%n buffer number
" %l/%L,%c%V line number, total number of lines, and column number
function SetStatusLineStyle()
if &stl == '' || &stl =~ 'synID'
let &stl="%f %y%([%R%M]%)%{'!'[&ff=='".&ff."']}%{'$'[!&list]}%{'~'[&pm=='']}%=#%n %l/%L,%c%V "
else
let &stl="%f %y%([%R%M]%)%{'!'[&ff=='".&ff."']}%{'$'[!&list]} (%{synIDattr(synID(line('.'),col('.'),0),'name')})%=#%n %l/%L,%c%V "
endif
endfunc
" Switch between the normal and vim-debug modes in the status line
nmap _ds :call SetStatusLineStyle()<CR>
call SetStatusLineStyle()
" Window title
if has('title')
set titlestring=%t%(\ [%R%M]%)
endif
endif