Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You asked for it :-)</p> <pre><code>"{{{Auto Commands " Automatically cd into the directory that the file is in autocmd BufEnter * execute "chdir ".escape(expand("%:p:h"), ' ') " Remove any trailing whitespace that is in the file autocmd BufRead,BufWrite * if ! &amp;bin | silent! %s/\s\+$//ge | endif " Restore cursor position to where it was before augroup JumpCursorOnEdit au! autocmd BufReadPost * \ if expand("&lt;afile&gt;:p:h") !=? $TEMP | \ if line("'\"") &gt; 1 &amp;&amp; line("'\"") &lt;= line("$") | \ let JumpCursorOnEdit_foo = line("'\"") | \ let b:doopenfold = 1 | \ if (foldlevel(JumpCursorOnEdit_foo) &gt; foldlevel(JumpCursorOnEdit_foo - 1)) | \ let JumpCursorOnEdit_foo = JumpCursorOnEdit_foo - 1 | \ let b:doopenfold = 2 | \ endif | \ exe JumpCursorOnEdit_foo | \ endif | \ endif " Need to postpone using "zv" until after reading the modelines. autocmd BufWinEnter * \ if exists("b:doopenfold") | \ exe "normal zv" | \ if(b:doopenfold &gt; 1) | \ exe "+".1 | \ endif | \ unlet b:doopenfold | \ endif augroup END "}}} "{{{Misc Settings " Necesary for lots of cool vim things set nocompatible " This shows what you are typing as a command. I love this! set showcmd " Folding Stuffs set foldmethod=marker " Needed for Syntax Highlighting and stuff filetype on filetype plugin on syntax enable set grepprg=grep\ -nH\ $* " Who doesn't like autoindent? set autoindent " Spaces are better than a tab character set expandtab set smarttab " Who wants an 8 character tab? Not me! set shiftwidth=3 set softtabstop=3 " Use english for spellchecking, but don't spellcheck by default if version &gt;= 700 set spl=en spell set nospell endif " Real men use gcc "compiler gcc " Cool tab completion stuff set wildmenu set wildmode=list:longest,full " Enable mouse support in console set mouse=a " Got backspace? set backspace=2 " Line Numbers PWN! set number " Ignoring case is a fun trick set ignorecase " And so is Artificial Intellegence! set smartcase " This is totally awesome - remap jj to escape in insert mode. You'll never type jj anyway, so it's great! inoremap jj &lt;Esc&gt; nnoremap JJJJ &lt;Nop&gt; " Incremental searching is sexy set incsearch " Highlight things that we find with the search set hlsearch " Since I use linux, I want this let g:clipbrdDefaultReg = '+' " When I close a tab, remove the buffer set nohidden " Set off the other paren highlight MatchParen ctermbg=4 " }}} "{{{Look and Feel " Favorite Color Scheme if has("gui_running") colorscheme inkpot " Remove Toolbar set guioptions-=T "Terminus is AWESOME set guifont=Terminus\ 9 else colorscheme metacosm endif "Status line gnarliness set laststatus=2 set statusline=%F%m%r%h%w\ (%{&amp;ff}){%Y}\ [%l,%v][%p%%] " }}} "{{{ Functions "{{{ Open URL in browser function! Browser () let line = getline (".") let line = matchstr (line, "http[^ ]*") exec "!konqueror ".line endfunction "}}} "{{{Theme Rotating let themeindex=0 function! RotateColorTheme() let y = -1 while y == -1 let colorstring = "inkpot#ron#blue#elflord#evening#koehler#murphy#pablo#desert#torte#" let x = match( colorstring, "#", g:themeindex ) let y = match( colorstring, "#", x + 1 ) let g:themeindex = x + 1 if y == -1 let g:themeindex = 0 else let themestring = strpart(colorstring, x + 1, y - x - 1) return ":colorscheme ".themestring endif endwhile endfunction " }}} "{{{ Paste Toggle let paste_mode = 0 " 0 = normal, 1 = paste func! Paste_on_off() if g:paste_mode == 0 set paste let g:paste_mode = 1 else set nopaste let g:paste_mode = 0 endif return endfunc "}}} "{{{ Todo List Mode function! TodoListMode() e ~/.todo.otl Calendar wincmd l set foldlevel=1 tabnew ~/.notes.txt tabfirst " or 'norm! zMzr' endfunction "}}} "}}} "{{{ Mappings " Open Url on this line with the browser \w map &lt;Leader&gt;w :call Browser ()&lt;CR&gt; " Open the Project Plugin &lt;F2&gt; nnoremap &lt;silent&gt; &lt;F2&gt; :Project&lt;CR&gt; " Open the Project Plugin nnoremap &lt;silent&gt; &lt;Leader&gt;pal :Project .vimproject&lt;CR&gt; " TODO Mode nnoremap &lt;silent&gt; &lt;Leader&gt;todo :execute TodoListMode()&lt;CR&gt; " Open the TagList Plugin &lt;F3&gt; nnoremap &lt;silent&gt; &lt;F3&gt; :Tlist&lt;CR&gt; " Next Tab nnoremap &lt;silent&gt; &lt;C-Right&gt; :tabnext&lt;CR&gt; " Previous Tab nnoremap &lt;silent&gt; &lt;C-Left&gt; :tabprevious&lt;CR&gt; " New Tab nnoremap &lt;silent&gt; &lt;C-t&gt; :tabnew&lt;CR&gt; " Rotate Color Scheme &lt;F8&gt; nnoremap &lt;silent&gt; &lt;F8&gt; :execute RotateColorTheme()&lt;CR&gt; " DOS is for fools. nnoremap &lt;silent&gt; &lt;F9&gt; :%s/$//g&lt;CR&gt;:%s// /g&lt;CR&gt; " Paste Mode! Dang! &lt;F10&gt; nnoremap &lt;silent&gt; &lt;F10&gt; :call Paste_on_off()&lt;CR&gt; set pastetoggle=&lt;F10&gt; " Edit vimrc \ev nnoremap &lt;silent&gt; &lt;Leader&gt;ev :tabnew&lt;CR&gt;:e ~/.vimrc&lt;CR&gt; " Edit gvimrc \gv nnoremap &lt;silent&gt; &lt;Leader&gt;gv :tabnew&lt;CR&gt;:e ~/.gvimrc&lt;CR&gt; " Up and down are more logical with g.. nnoremap &lt;silent&gt; k gk nnoremap &lt;silent&gt; j gj inoremap &lt;silent&gt; &lt;Up&gt; &lt;Esc&gt;gka inoremap &lt;silent&gt; &lt;Down&gt; &lt;Esc&gt;gja " Good call Benjie (r for i) nnoremap &lt;silent&gt; &lt;Home&gt; i &lt;Esc&gt;r nnoremap &lt;silent&gt; &lt;End&gt; a &lt;Esc&gt;r " Create Blank Newlines and stay in Normal mode nnoremap &lt;silent&gt; zj o&lt;Esc&gt; nnoremap &lt;silent&gt; zk O&lt;Esc&gt; " Space will toggle folds! nnoremap &lt;space&gt; za " Search mappings: These will make it so that going to the next one in a " search will center on the line it's found in. map N Nzz map n nzz " Testing set completeopt=longest,menuone,preview inoremap &lt;expr&gt; &lt;cr&gt; pumvisible() ? "\&lt;c-y&gt;" : "\&lt;c-g&gt;u\&lt;cr&gt;" inoremap &lt;expr&gt; &lt;c-n&gt; pumvisible() ? "\&lt;lt&gt;c-n&gt;" : "\&lt;lt&gt;c-n&gt;\&lt;lt&gt;c-r&gt;=pumvisible() ? \"\\&lt;lt&gt;down&gt;\" : \"\"\&lt;lt&gt;cr&gt;" inoremap &lt;expr&gt; &lt;m-;&gt; pumvisible() ? "\&lt;lt&gt;c-n&gt;" : "\&lt;lt&gt;c-x&gt;\&lt;lt&gt;c-o&gt;\&lt;lt&gt;c-n&gt;\&lt;lt&gt;c-p&gt;\&lt;lt&gt;c-r&gt;=pumvisible() ? \"\\&lt;lt&gt;down&gt;\" : \"\"\&lt;lt&gt;cr&gt;" " Swap ; and : Convenient. nnoremap ; : nnoremap : ; " Fix email paragraphs nnoremap &lt;leader&gt;par :%s/^&gt;$//&lt;CR&gt; "ly$O#{{{ "lpjjj_%A#}}}jjzajj "}}} "{{{Taglist configuration let Tlist_Use_Right_Window = 1 let Tlist_Enable_Fold_Column = 0 let Tlist_Exit_OnlyWindow = 1 let Tlist_Use_SingleClick = 1 let Tlist_Inc_Winwidth = 0 "}}} let g:rct_completion_use_fri = 1 "let g:Tex_DefaultTargetFormat = "pdf" let g:Tex_ViewRule_pdf = "kpdf" filetype plugin indent on syntax on </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload