-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc_old
executable file
·102 lines (86 loc) · 2.84 KB
/
vimrc_old
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
" Syntax highlighting
syntax on
" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
if has("autocmd")
filetype plugin indent on
endif
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
"set autowrite " Automatically save before commands like :next and :make
set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes)
set expandtab "converts tabs to spaces
set smarttab " bases indent on filetype
set shiftwidth=4
set tabstop=4
set softtabstop=4
" Change indenting for css, html
autocmd FileType css,html,htmldjango,phtml
\ setlocal shiftwidth=2 |
\ setlocal tabstop=2
let loaded_matchparen = 1 " Don't highlight brackets
set ruler
set nocompatible
set vb t_vb= " stops the beeping
""highlight search results
set hlsearch
set incsearch
"status line
set laststatus=2
"map ctrl-space to no-op b/c i use it with screen
imap <Nul> <Nop>
map <Nul> <Nop>
vmap <Nul> <Nop>
cmap <Nul> <Nop>
nmap <Nul> <Nop>
" Mappings to access buffers (don't use "\p" because a
" delay before pressing "p" would accidentally paste).
" \l : list buffers
" \b \f \g : go back/forward/last-used
" \1 \2 \3 : go to buffer 1/2/3 etc
nnoremap <Leader>l :ls<CR>
nnoremap <Leader>b :bp<CR>
nnoremap <Leader>f :bn<CR>
nnoremap <Leader>g :e#<CR>
nnoremap <Leader>1 :1b<CR>
nnoremap <Leader>2 :2b<CR>
nnoremap <Leader>3 :3b<CR>
nnoremap <Leader>4 :4b<CR>
nnoremap <Leader>5 :5b<CR>
nnoremap <Leader>6 :6b<CR>
nnoremap <Leader>7 :7b<CR>
nnoremap <Leader>8 :8b<CR>
nnoremap <Leader>9 :9b<CR>
nnoremap <Leader>0 :10b<CR>
" It's useful to show the buffer number in the status line.
set laststatus=2 statusline=%02n:%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
" tab completion for filenames
set wildmode=longest,list,full
set wildmenu
" java syntax highlighting for beanshell scripts
au BufWinEnter,BufRead,BufNewFile *.bsh set filetype=java
"" automatically fold based on syntax files
"let php_folding = 1
"set foldmethod=syntax
"set foldcolumn=2
"set foldclose=all
" window splitting and switching
" save a keystroke; instead of ctrl-w then j, it's just ctrl-j
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Open new split panes to right and bottom; feels more natural than Vim's default
set splitbelow
set splitright