about vim and the settings line in Portfiles

René J.V. Bertin rjvbertin at gmail.com
Fri Jan 9 04:43:28 PST 2015


Hi,

This has been bothering me for a while. Each time I open/reload a Portfile in vim (my main editor for that kind of file), something is done that makes vim consider the file edited immediately, while it also thinks there's nothing to be undone.
I'm guessing it must be due to my own settings, but I really have no clue which one might be the culprit.

Are there any vi wizards on here who'd be willing to have a look? Oh, and btw, the answer is *not* "use emacs" ;)

Thanks,
René

-------- ~/.exrc
set tags+=/usr/local/include/tags
set autoindent
set noautoprint
set noignorecase
set nomesg
set noslowopen
set noterse
set nonumber
set showmode
set report=1
set tabstop=5
set shiftwidth=5
map  h
" whole bunch of other map commands
ab �e �
ab �e �
ab �a �
ab �a � 
ab �i �
ab �o �
ab �o �
ab �o �
ab �u �
ab �u �
ab �u �
ab �c �

----------- .vimrc
set nobackup
set path=.\ /usr/include\ /usr/include/X11R4\ /usr/include/X11R4/X11\ /usr/people/bertin/work/include\ /usr/people/bertin/work/include/local\ /usr/people/bertin/script\ /usr/local/include
set ruler
"set errorformat=cfe:\ Error:\ %f,\ line\ %l:%m
set errorformat=%f:%l:%m
set showcmd
set smartindent
set smarttab
set ttyfast
set equalprg=
set showmatch
set title
set cinwords=if,else,while,do,for,switch,case,default:,
set gfn=*-monaco-*--12*-iso8859-1
set guifont=Monaco\ 8
" allow backspacing over anything:
set bs=2
"
syntax off

" Set GNU style indentation, spaces instead of TABs
function! CoreutilsIndent()
    " Check if 'coreutils' is part of the current working directory
    if match(getcwd(), "coreutils") > 0
        " The next 3 lines below set the GNU indentation
        setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1
        setlocal shiftwidth=2
        setlocal tabstop=8
        " Coreutils specific, expand TABs with spaces
        setlocal expandtab
    endif
endfunction
autocmd BufEnter *.c,*.h call CoreutilsIndent()

so ~/.exrc



More information about the macports-dev mailing list