start removing old cruft
This commit is contained in:
parent
12a93ee589
commit
664397ff42
80
vimrc
80
vimrc
@ -1,20 +1,8 @@
|
|||||||
" Use Vim settings, rather then Vi settings (much better!).
|
|
||||||
" This must be first, because it changes other options as a side effect.
|
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
|
||||||
" Only do this part when compiled with support for autocommands.
|
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
|
|
||||||
" Enable file type detection.
|
|
||||||
" Use the default filetype settings, so that mail gets 'tw' set to 72,
|
|
||||||
" 'cindent' is on in C files, etc.
|
|
||||||
" Also load indent files, to automatically do language-dependent indenting.
|
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
" Put these in an autocmd group, so that we can delete them easily.
|
|
||||||
augroup vimrcEx
|
|
||||||
au!
|
|
||||||
|
|
||||||
" For all text files set 'textwidth' to 78 characters.
|
" For all text files set 'textwidth' to 78 characters.
|
||||||
autocmd FileType text setlocal textwidth=78
|
autocmd FileType text setlocal textwidth=78
|
||||||
|
|
||||||
@ -25,13 +13,6 @@ if has("autocmd")
|
|||||||
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
||||||
\ exe "normal! g`\"" |
|
\ exe "normal! g`\"" |
|
||||||
\ endif
|
\ endif
|
||||||
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
set autoindent " always set autoindenting on
|
|
||||||
|
|
||||||
endif " has("autocmd")
|
endif " has("autocmd")
|
||||||
|
|
||||||
set ruler
|
set ruler
|
||||||
@ -49,11 +30,11 @@ set hlsearch
|
|||||||
set showmatch
|
set showmatch
|
||||||
set incsearch
|
set incsearch
|
||||||
set tags=./tags;/
|
set tags=./tags;/
|
||||||
let Tlist_WinWidth = 40
|
|
||||||
set grepprg=internal
|
set grepprg=internal
|
||||||
set tabpagemax=999
|
set tabpagemax=999
|
||||||
set nobackup
|
set nobackup
|
||||||
set nowritebackup
|
set nowritebackup
|
||||||
|
set noswapfile
|
||||||
set wildmode=longest,list,full
|
set wildmode=longest,list,full
|
||||||
set splitright
|
set splitright
|
||||||
|
|
||||||
@ -66,11 +47,11 @@ if has("gui_running")
|
|||||||
colorscheme ir_black
|
colorscheme ir_black
|
||||||
runtime ftplugin/man.vim
|
runtime ftplugin/man.vim
|
||||||
nmap K :Man <cword><CR>
|
nmap K :Man <cword><CR>
|
||||||
set lines=50
|
" set lines=50
|
||||||
set scrolloff=8
|
set scrolloff=8
|
||||||
if &diff
|
" if &diff
|
||||||
set columns=175
|
" set columns=175
|
||||||
endif
|
" endif
|
||||||
set guioptions-=m " remove menu bar
|
set guioptions-=m " remove menu bar
|
||||||
set guioptions-=T " remove toolbar
|
set guioptions-=T " remove toolbar
|
||||||
set colorcolumn=80
|
set colorcolumn=80
|
||||||
@ -89,41 +70,26 @@ map ,p :set paste
o#73A A#0ll:set nopaste
R
|
|||||||
map ,* :set paste
O/74A*o 73A*A/O * :set nopaste
A
|
map ,* :set paste
O/74A*o 73A*A/O * :set nopaste
A
|
||||||
map ,; :set paste
O;74A*o;*72A A*o;74A*0klll:set nopaste
R
|
map ,; :set paste
O;74A*o;*72A A*o;74A*0klll:set nopaste
R
|
||||||
map ,8 :set paste
o20A-A8<20A-:set nopaste
0
|
map ,8 :set paste
o20A-A8<20A-:set nopaste
0
|
||||||
map ,m mz:%s/
//g
:noh
'z
|
map ,m mz:%s/
//g
:noh
`z
|
||||||
map ,t :tabn
|
map ,t :tabn
|
||||||
map ,T :tabp
|
map ,T :tabp
|
||||||
map ,s mz:%s/\v\s+$//
'z
|
map ,s mz:%s/\v\s+$//
`z
|
||||||
map ,f :set ts=8
:retab
:set ts=4
|
map ,f :set ts=8
:retab
:set ts=4
|
||||||
map ,C ggVGc
|
|
||||||
" jump to tag in a new tab
|
" jump to tag in a new tab
|
||||||
map ,w :tab :tag
|
map ,w :tab :tag
|
||||||
"nnoremap <silent> <F8> :TlistToggle<CR>
|
|
||||||
" re-indent the following line how vim would automatically do it
|
" re-indent the following line how vim would automatically do it
|
||||||
map ,j Ji
|
map ,j Ji
|
||||||
map :cn
|
map :cn
|
||||||
map :cp
|
map :cp
|
||||||
" copy searched-for symbol to clipboard
|
|
||||||
nnoremap * :let @+=expand("<cword>")<CR>*
|
|
||||||
|
|
||||||
" highlight characters past column 80
|
|
||||||
map ,L :highlight TooLong guibg=lightyellow
:match TooLong '\%>80v.*.$'
|
|
||||||
|
|
||||||
" flag more than 80 characters in a row as an error
|
|
||||||
" 3match error '\%>80v.\+'
|
|
||||||
|
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
autocmd FileType text setlocal noautoindent
|
autocmd FileType text setlocal noautoindent
|
||||||
" autocmd FileType c match error /\v\s+$/
|
|
||||||
" autocmd FileType c 2match error /\t/
|
|
||||||
" autocmd FileType cpp 2match error /\t/
|
|
||||||
autocmd FileType c syn match Constant display "\<[A-Z_][A-Z_0-9]*\>"
|
autocmd FileType c syn match Constant display "\<[A-Z_][A-Z_0-9]*\>"
|
||||||
autocmd FileType cpp syn match Constant display "\<[A-Z_][A-Z_0-9]*\>"
|
autocmd FileType cpp syn match Constant display "\<[A-Z_][A-Z_0-9]*\>"
|
||||||
autocmd FileType dosbatch syn match Comment "^@rem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument
|
autocmd FileType dosbatch syn match Comment "^@rem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument
|
||||||
au BufRead,BufNewFile *.dxl set filetype=dxl
|
autocmd BufRead,BufNewFile *.dxl set filetype=dxl
|
||||||
autocmd FileType dxl set syntax=cpp
|
autocmd FileType dxl setlocal syntax=cpp
|
||||||
" open all buffers in a new tab
|
" install glsl.vim in ~/.vim/syntax to use syntax highlighting for GLSL:
|
||||||
" au BufAdd,BufNewFile * nested tab sball
|
|
||||||
" install glsl.vim in ~/.vim/syntax to use syntax highlighting for GLSL:
|
|
||||||
au BufNewFile,BufWinEnter *.frag,*.vert,*.fp,*.vp,*.glsl setf glsl
|
au BufNewFile,BufWinEnter *.frag,*.vert,*.fp,*.vp,*.glsl setf glsl
|
||||||
autocmd Syntax {cpp,c,idl} runtime syntax/doxygen.vim
|
autocmd Syntax {cpp,c,idl} runtime syntax/doxygen.vim
|
||||||
autocmd QuickFixCmdPre grep copen
|
autocmd QuickFixCmdPre grep copen
|
||||||
@ -133,29 +99,5 @@ if has("autocmd")
|
|||||||
autocmd FileType xml setlocal sw=2 ts=2 sts=2
|
autocmd FileType xml setlocal sw=2 ts=2 sts=2
|
||||||
autocmd FileType yaml setlocal sw=2 ts=2 sts=2
|
autocmd FileType yaml setlocal sw=2 ts=2 sts=2
|
||||||
autocmd FileType ruby setlocal sw=2 ts=2 sts=2
|
autocmd FileType ruby setlocal sw=2 ts=2 sts=2
|
||||||
|
autocmd FileType vim setlocal sw=2 ts=2 sts=2
|
||||||
endif " has("autocmd")
|
endif " has("autocmd")
|
||||||
|
|
||||||
if !exists('s:loaded')
|
|
||||||
let s:loaded = 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
if s:loaded
|
|
||||||
delfunction Bwmatch
|
|
||||||
delcommand Bwmatch
|
|
||||||
endif
|
|
||||||
|
|
||||||
function Bwmatch(exp)
|
|
||||||
let last = bufnr('$')
|
|
||||||
let index = 0
|
|
||||||
while index <= last
|
|
||||||
if bufexists(index) && bufname(index) =~ a:exp
|
|
||||||
execute ':bw ' . index
|
|
||||||
endif
|
|
||||||
let index += 1
|
|
||||||
endwhile
|
|
||||||
redraw!
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
command -nargs=1 Bwmatch :call Bwmatch('<args>')
|
|
||||||
|
|
||||||
let s:loaded = 1
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user