Revision history for VimModelines

Revision [23476]

Last edited on 2016-05-20 07:38:48 by BrianKoontz [Replaces old-style internal links with new pipe-split links.]
//This article is for Developers who use [[ | Vim]] to edit wikka sources.//
//This article is for Developers who use [[ Vim]] to edit wikka sources.//

Revision [21378]

Edited on 2011-03-16 12:03:56 by BrianKoontz [restored original]
==CategoryDevelopment== [[ essay help]]

Revision [21377]

Edited on 2011-03-15 17:02:47 by KellyLayton [restored original]
==CategoryDevelopment== [[ essay help]]

Revision [18822]

Edited on 2008-01-28 00:12:52 by MinusF [Modified links pointing to docs server]

No Differences

Revision [13742]

Edited on 2006-04-06 07:23:57 by MinusF [some other .vimrc examples]
====Another Example====
as it is unlikely that vim modelines will make it into the code repository, one could simply put in .vimrc:
set ts=8
set sts=4
set sw=4
set tw=0
" highlight with red unneeded whitespace at end of line
highlight WhitespaceEOL ctermbg=red guibg=red
match WhitespaceEOL /\s\+$/
" go to the last known position in the opened file
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
" smart tab function from
inoremap <tab> <c-r>=InsertTabWrapper ("forward")<cr>
inoremap <s-tab> <c-r>=InsertTabWrapper ("backward")<cr>
function! InsertTabWrapper(direction)
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
elseif "backward" == a:direction
return "\<c-p>"
return "\<c-n>"

Revision [13671]

Edited on 2006-03-30 08:04:46 by DotMG [Vim modelines without editing wikka sources!]
{{color c="red" text="The inconvenient of this is that all php source will be modified! Another solution is to modify vim settings locally for all contributors"}}:
- Edit the file ''filetype.vim''.
- For example, I use Vim on Windows, and **all** my wikka files are stored at d:\SVN\wikka, I just added this line to ''filetype.vim'' : %%(vim)au BufNewFile,BufRead d:/SVN/wikka/*.php setf wikka%%

Revision [13668]

The oldest known version of this page was created on 2006-03-30 07:41:34 by DotMG [Vim modelines without editing wikka sources!]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki