| version 1.11, 2001/10/23 14:01:17 |
version 1.12, 2001/11/02 19:13:41 |
|
|
| " Vim configuration file |
" Vim configuration file |
| " Language: Vim 5.6 script (with Vim 6.0 features) |
" Language: Vim 5.6 script (with Vim 6.0 features) |
| " Maintainer: Lubomir Host <host8@kepler.fmph.uniba.sk> |
" Maintainer: Lubomir Host <host8@kepler.fmph.uniba.sk> |
| " Bugs Report: Lubomir Host <host8@kepler.fmph.uniba.sk> |
" Bugs Reports: Lubomir Host <host8@kepler.fmph.uniba.sk> |
| " Copyright: GNU GPL |
" License: GNU GPL |
| " Last Change: 2001 Oct 23 15:56:41 |
" Last Change: 2001 Nov 01 21:36:58 |
| " Version: 01.09.08 |
" Version: 01.09.08 |
| " Language Of Comments: Slovak |
" Language Of Comments: English |
| |
|
| " $Id$ |
" $Id$ |
| |
|
| " Settings {{{1 |
" Settings {{{1 |
| " ... to be secure & Vi nocompatible |
" To be secure & Vi nocompatible |
| :set secure nocompatible |
:set secure nocompatible |
| :if version >= 600 |
:if version >= 600 |
| : syntax enable |
: syntax enable |
|
|
| " Available TAGS files |
" Available TAGS files |
| :set tags=./TAGS,./tags,tags |
:set tags=./TAGS,./tags,tags |
| |
|
| " Don't add EOF at end of file! |
" Don't add EOF at end of file |
| :set noendofline |
:set noendofline |
| |
|
| :set showfulltag |
:set showfulltag |
|
|
| :set incsearch report=0 title |
:set incsearch report=0 title |
| :set showcmd showmatch showmode |
:set showcmd showmatch showmode |
| |
|
| |
" Indent of 1 tab with size of 4 spaces |
| |
:set tabstop=4 |
| |
:set shiftwidth=4 |
| |
|
| |
" Use an indent of 4 spaces, with no tabs. This setting is recommended by PEAR |
| |
" (PHP Extension and Application Repository) Conding Standarts. If you want |
| |
" this setting uncomment the expandtab setting below. |
| |
":set expandtab |
| |
|
| " Settings for mouse (gvim under Xwindows) |
" Settings for mouse (gvim under Xwindows) |
| :set nomousefocus mousehide |
:set nomousefocus mousehide |
| |
|
| " cursor always in the middle of the screen |
" Cursor always in the middle of the screen |
| :set scrolloff=999 |
:set scrolloff=999 |
| " make window maximalized |
|
| |
" Make window maximalized |
| :set winheight=100 |
:set winheight=100 |
| |
|
| " the screen will not be redrawn while executing macros, registers |
" The screen will not be redrawn while executing macros, registers |
| " and other commands that have not been typed. To force an update use |:redraw|. |
" and other commands that have not been typed. To force an updates use |:redraw|. |
| :set lazyredraw |
:set lazyredraw |
| |
|
| " Vim beeping go to the hell... |
" Vim beeping go to the hell... |
|
|
| :endif |
:endif |
| |
|
| "################################################################# }}}1 |
"################################################################# }}}1 |
| " Keybord mappings. {{{1 |
" Keybord mappings {{{1 |
| " |
" |
| " start of line |
" start of line |
| ":noremap <C-A> i<Home> |
":noremap <C-A> i<Home> |
|
|
| " forward one word |
" forward one word |
| ":inoremap <C-F> <S-Right> |
":inoremap <C-F> <S-Right> |
| |
|
| " prepinanie medzi oknami stlacenim 1x CTRL-X |
" Switching between windows by pressing one time CTRL-X keys. |
| :noremap <C-X> <C-W><C-W> |
:noremap <C-X> <C-W><C-W> |
| |
|
| :set remap |
:set remap |
|
|
| :augroup END |
:augroup END |
| """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}}2 |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}}2 |
| " Autocommands for *.html *.cgi {{{2 |
" Autocommands for *.html *.cgi {{{2 |
| " toto sa postara o automaticky update datumu poslednej modifikacie |
" Automatic updates date of last modification in HTML files. File must |
| " *.html suborov |
" contain line "^Last modified: ", else will be date writtend on the current |
| " Podmienka: v subore sa musi vyskytovat riadok "^Last modified: ", |
" line. |
| " inac sa datum napise na aktualnom riadku |
|
| :augroup HtmlCgi |
:augroup HtmlCgi |
| : autocmd! |
: autocmd! |
| " doplnanie parovej znacky v suboroch *.html |
" Appending right part of tag in HTML files. |
| : autocmd BufEnter *.html :imap QQ </>2F<lywf>f/pF<i |
: autocmd BufEnter *.html :imap QQ </>2F<lywf>f/pF<i |
| : autocmd BufLeave *.html :iunmap QQ |
: autocmd BufLeave *.html :iunmap QQ |
| : autocmd BufWritePre,FileWritePre *.html :call AutoLastMod() |
: autocmd BufWritePre,FileWritePre *.html :call AutoLastMod() |
|
|
| "################################################################# }}}1 |
"################################################################# }}}1 |
| " Functions {{{1 |
" Functions {{{1 |
| " Function ChangeFoldMethod() {{{2 |
" Function ChangeFoldMethod() {{{2 |
| " funkcia na zmenu skryvacej metody |
" Function for changing folding method. |
| " |
" |
| :if version >= 600 |
:if version >= 600 |
| : fun! ChangeFoldMethod() |
: fun! ChangeFoldMethod() |
|
|
| :endif |
:endif |
| """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}}2 |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}}2 |
| " Function SetVimVar() {{{2 |
" Function SetVimVar() {{{2 |
| " funkcia podla riadku v 'modelines' VIM_VAR: var1=value1 var2=value2 |
" Functions set appropriate values in variables according to line in |
| " nastavi prislusne hodnoty premennych |
" 'modelines' VIM_VAR: var1=value1 var2=value2 |
| " |
" |
| "fun! SetVimVar() |
"fun! SetVimVar() |
| ":$-5,$ call SetVimVarFromLine() |
":$-5,$ call SetVimVarFromLine() |
| "endfun |
"endfun |
|
|
| "endfun |
"endfun |
| """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}}2 |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}}2 |
| " Function AutoLastMod() {{{2 |
" Function AutoLastMod() {{{2 |
| " funkcia zabezpeci automaticku zmenu datumu suborov *.html |
" Provides atomatic change of date in files, if it is set via |
| " ak je napr. cez modeline nastavena premmenna autolastmod |
" modeline variable autolastmod to appropriate value. |
| " na prislusnu hodnotu |
|
| " |
" |
| fun! AutoLastMod() |
fun! AutoLastMod() |
| :if exists("g:autolastmod") |
:if exists("g:autolastmod") |
| Line 396 fun! AutoLastMod() |
|
| Line 404 fun! AutoLastMod() |
|
| endfun |
endfun |
| """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}}2 |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}}2 |
| " Function LastMod() {{{2 |
" Function LastMod() {{{2 |
| " funkcia na automaticku upravu datumu *.html suborov |
" Automatic change date in *.html files. |
| " |
" |
| fun! LastMod(text, ...) |
fun! LastMod(text, ...) |
| :mark d |
:mark d |
| Line 412 fun! LastMod(text, ...) |
|
| Line 420 fun! LastMod(text, ...) |
|
| endfun |
endfun |
| """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}}2 |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}}2 |
| " Function MakeHeader() {{{2 |
" Function MakeHeader() {{{2 |
| " funkcia na pripravu hlavicky *.h suborov |
" Prepare header in *.h files. |
| " |
" |
| fun! MakeHeader() |
fun! MakeHeader() |
| " nastavia sa premenne, ze ako budu vyzerat riadky |
" Line look variables. |
| :let line = "" . bufname("%") |
:let line = "" . bufname("%") |
| :let line = substitute(line, "\\\.", "_\0", "") |
:let line = substitute(line, "\\\.", "_\0", "") |
| :let line1 = substitute(line, ".*", "#ifndef _\\U\\0", "") |
:let line1 = substitute(line, ".*", "#ifndef _\\U\\0", "") |
| :let line2 = substitute(line, ".*", "#define _\\U\\0", "") |
:let line2 = substitute(line, ".*", "#define _\\U\\0", "") |
| :let line6 = "#endif /* " . line1 . " */" |
:let line6 = "#endif /* " . line1 . " */" |
| " vypis nastavenych premmennych |
" Writeout of sets variebles. |
| ":echo line |
":echo line |
| " ... |
" ... |
| " nastavovanie konkretnych riadkov podla premennych |
" Setting appropriate lines according to the prepared variables. |
| " v danom subore musi byt dostatocny pocet riadkov, lebo inac setline() zlyha!! |
" In target file there must be sufficient number of lines, else setline() will |
| " append pridava dalsi riadok do suboru, vid :help append |
" fails. Function append() appends next line into file, see :help append |
| :call setline(1, line1) |
:call setline(1, line1) |
| :call append(1, line2) |
:call append(1, line2) |
| :call append(2, "") |
:call append(2, "") |
| Line 438 fun! MakeHeader() |
|
| Line 446 fun! MakeHeader() |
|
| endfun |
endfun |
| """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}}2 |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}}2 |
| " Function OpenAllWin() {{{2 |
" Function OpenAllWin() {{{2 |
| " Otvaraniem okien pre vsetky subory na prikazovom riadku |
" Opens windows for all files in the command line. |
| " premenna "opened" je pouzita pre test, ci uz boli okna |
" Variable "opened" is used for testing, if window for file was already opened |
| " pre subory raz otvarane, aby sa predislo opatovnemu |
" or not. This is prevention for repeat window opening after ViM config file |
| " otvaraniu okien, ak sa zmeni konfiguracny subor (resp. |
" reload. |
| " sa znovu nacita) |
|
| " |
" |
| :fun! OpenAllWin() |
:fun! OpenAllWin() |
| :let i = 0 |
:let i = 0 |
|
|
| " vim:set ts=4: |
" vim:set ts=4: |
| " vim600:fdm=marker fdl=0 fdc=3: |
" vim600:fdm=marker fdl=0 fdc=3: |
| "################################################################# }}}1 |
"################################################################# }}}1 |
| |
|