" gvim settings: " "set guifontset=-misc-fixed-medium-r-normal-*-*-120-*-*-c-*-iso8859-2 "set guifont=-misc-fixed-medium-r-normal-*-*-120-*-*-c-*-iso8859-2 "set mouse=a "set guifontset="Monospace 13" "set guifont="Monospace 13" "colorscheme pablo " vim setting: " set bg=dark " " VIM configuration file " Author: Piotr Debicki (pdebicki@poczta.onet.pl) """""""" " " Always set autoindenting on " set autoindent " " Automatically save modifications to files when " using critical commands " set autowrite " " Allow backspacing over everything in insert mode " set backspace=2 " " Don't make a backup before overwriting " set nobackup " " Reset cinwords - this suxx with smartindent " set cinwords= " " Use Vim settings, rather then Vi settings " set nocompatible " " Ask for confirmation rather then refuse certain commands " set confirm " " Type of in written files " set fileformats=unix,dos " " Automatic formatting settings " set formatoptions=croq " " Keep hidden windows " set hidden " " Keep 50 lines of command line history " set history=50 " " Don't highlight search patterns " set nohlsearch " " Ignore case in search patterns " set ignorecase " " Always show statusbar " set laststatus=2 " " Don't update screen while executing macros " set lazyredraw " " Strings to use in 'list' mode " set listchars=tab:>-,trail:-,eol:$ " " Show the cursor position all the time " set ruler " " Content of the ruler string " set rulerformat=%l,%c%V%=#%n\ %3p%% " " Minimal number of lines to scroll when the cursor gets off the screen " " set scrolljump=1 " " Minimal number of screen lines to keep above and below the cursor " set scrolloff=3 " " Define the behavior of the selection " set selection=exclusive " " Name of the shell to use for ! and :! commands " " set shell=binbash " " Number of spaces to use for each step of (auto)indent " set shiftwidth=4 " " Abbreviate some messages " set shortmess=atToOI " " String to put at the start of lines that have been wrapped " set showbreak=> " " Show (partial) command in status line " set showcmd " " When a bracket is inserted, briefly jump to the matching one " set showmatch " " Do smart autoindenting when starting a new line " set smartindent " " Create new window below current one " set splitbelow " " Use swap file " set swapfile " " Turn beeping off " set t_vb= " " Set tab stop to 4 " set tabstop=4 " " Turn off scrolling -> faster " " set ttyscroll=0 " " After typing this many chars the swap file will be written to disk " set updatecount=50 " " Configure .viminfo " set viminfo='20,\"50 " " Cursor keys wrap to previous/next line " set whichwrap+=<,>,[,] " " Character to start wildcard expansion in the command-line " set wildchar= " " Put command-line completion in an enhanced mode " set wildmenu " " Turn line wrapping off (a ja chcę wrap) " " set nowrap " " Number of characters from the right window border where wrapping starts " set wrapmargin=1 " " Turn syntax highlighting on " syntax on " " wgrywaj również widoki dla plików php " au BufWinLeave *.php mkview au BufWinEnter *.php silent loadview " " ============================ " Abbreviations " ============================ " " Some C abbreviations " iab Zmain int main(int argc, char *argv[]) iab Zinc #include iab Zdef #define " " Some other abbreviations " iab Zdate =strftime("%y%m%d") iab Ztime =strftime("%H:%M:%S") iab Zmymail pdebicki@poczta.onet.pl iab Zmyphone 0 502 935 242 iab Zfilename =expand("%:t:r") iab Zfilepath =expand("%:p") " " ============================ " Customization " ============================ " " Function keys " nmap 3K nmap :cnext nmap :cprevious nmap :clist nmap :make nmap :!! nmap :call SwitchTabstop() nmap :call SwitchSyntax() nmap :call SwitchIndent() imap 3Ki imap :cnext imap :cprevious imap :clist imap :make imap :!! imap :call SwitchTabstop()i imap :call SwitchSyntax()i imap :call SwitchIndent()i " " Show next buffer " nmap :bnext " " Execute shell commands easier " nmap ! :! " " Align line " nmap ,ac :center nmap ,al :left nmap ,ar :right " " Print the ASCII value of the character under the cursor " nmap ,as :ascii " " Change type of - unix/dos " nmap ,eol :call ChangeFileFormat() " " Insert C/C++ source footer " nmap ,fo :%r $HOME/src/TEMPLATE/FOOTER " " Insert C/C++ source header " nmap ,he :0r $HOME/src/TEMPLATE/HEADER " " Turn highlight search on/off " nmap ,hs :call ToggleOption('hlsearch') " " Turn line numbers on/off " nmap ,nu :call ToggleOption('number') " " Remove all empty lines " nmap ,re :g/^$/d " " Edit .vimrc " nmap ,rc :n $HOME/.vimrc " " Turn line wrapping on/off " nmap ,wr :call ToggleOption('wrap') " " Show white spaces on/off " nmap ,ws :call ToggleOption('list') " " Make selection lowercase " vmap ,l u " " Rot13 encode selection " vmap ,r g? " " Make selection switch case " vmap ,s ~ " " Make selection uppercase " vmap ,u U " " tym, oto, skrótem komentuj/unkomentuj całe linie, bloki, etc. " niezbędny plugin enhcommentify w ~/.vim/plugin " nmap :call EnhancedCommentify('', 'guess')j vmap :call EnhancedCommentify('', 'guess')j " " ============================ " Functions " ============================ function ToggleOption (option) execute 'set ' . a:option . '!' execute 'echo "' . a:option . ':" strpart("OFFON",3*&' . a:option . ',3)' endfunction function ChangeFileFormat() if &fileformat == "unix" set fileformat=dos echo " type: DOS" else set fileformat=unix echo " type: UNIX" endif endfunction function SwitchTabstop() if &tabstop == 4 set tabstop=8 echo "Tabstop = 8" else set tabstop=4 echo "Tabstop = 4" endif endfunction function SwitchSyntax() if has("syntax_items") syntax off echo "Syntax highlighting OFF" else syntax on echo "Syntax highlighting ON" endif endfunction function SwitchIndent() if &autoindent set noautoindent set nosmartindent set formatoptions= echo "Indent OFF" else set autoindent set smartindent set formatoptions=croq echo "Indent ON" endif endfunction " vim:ts=4:sw=4:wrap: " - EOF -