X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=blobdiff_plain;f=.vimrc;h=ddcc499e7c7eae18ed621244a1ce718a19db9317;hp=18181257d655b47d5d148e57b6679298f01ad058;hb=3a7b05e00b60125a724325a6da0c66ce7feb4c8e;hpb=2166b1c513716fe707589c2c0845a2498b9480fa diff --git a/.vimrc b/.vimrc index 1818125..ddcc499 100644 --- a/.vimrc +++ b/.vimrc @@ -87,7 +87,9 @@ set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:p:h\")})%)%(\ %a%)\ -\ [%{$USER}@%{h " 9 using the mouse -set mouse=ar " Use mouse in all modes, plus hit-return +if has('mouse') + set mouse=ar " Use mouse in all modes, plus hit-return +endif " 12 messages and info @@ -183,15 +185,16 @@ set fileencodings=ucs-bom,us-ascii,utf-8,koi8-r,cp1251,cp866,latin1 " ' - number of files for which the marks are remembered; " " and < - maximum number of lines saved for a register; " s - maximum size of an item in Kbytes. +set viminfo=!,h,'50 if version < 603 - set viminfo=!,h,'50,\"1000 + set viminfo+=\"1000 else - set viminfo=!,h,'50,<1000,s10 + set viminfo+=<1000,s10 endif " c - convert viminfo to the current encoding; if has("iconv") - set viminfo^=c + set viminfo+=c endif " Removable media paths @@ -571,7 +574,7 @@ function! SlowTerm() set wildmode=list:longest set viminfo=!,h,'10,<100,s5 if has("iconv") - set viminfo^=c + set viminfo+=c endif syntax off highlight NonText cterm=NONE ctermfg=NONE @@ -609,6 +612,7 @@ if executable('chmod') echoerr 'Error running chmod: ' . v:shell_error endif checktime + autocmd! FileChangedShell endfunction function! _BufChangedCB() autocmd! FileChangedShell @@ -616,6 +620,15 @@ if executable('chmod') command! ToggleXbit if executable(expand("%:p")) | call SetExecutableBit(0) | else | call SetExecutableBit(1) | endif endif +function! Code() + setlocal tabstop=8 softtabstop=4 shiftwidth=4 expandtab +endfunction +command! Code call Code() + +function! Text() + setlocal tabstop=8 softtabstop=3 shiftwidth=3 expandtab +endfunction +command! Text call Text() " ---------- " From http://slobin.pp.ru/vim/_vimrc.html