Recap Vimfest 2015
SvenG
@guckes
Tim Quellmalz:
@tqmz
Tab & Trailing Whitespace
" shortcuts for replacing tabs / removing trailing whitespace
nmap <silent> <LocalLeader>ct :%s/\t/ /g<CR>:%s/\s\+$//g<CR>
nmap <silent> <LocalLeader>cs :%s/\s\+$//g<CR>
" alternative
:help retab
Firefox
start multiple profiles (instances) at the same time (open profiles of current topics only):
Jabber
Chrome
Zsh
Blogging
Markdown
Vim Sessions
project-wise sessions
path/to/project/.vimrc:
" restore actions (tab selection, window resizing etc.)
source .vimsession
" restore buffers ... and history of commands, searches, buffers etc.
exec "set viminfo=%,'50,<1000,s100,:50,@10,/50,n" . g:proj_path . ".viminfo"
" map F10 to save & exit
exec "nmap <silent> <F10> :mksession! " . g:proj_path . ".vimsession<CR>:wviminfo! " . g:proj_path . ".viminfo<CR>:qa!<CR>"
Vim Colors
Cursor "Fadenkreuz"
set cursorcolumn " highlight the current column – disturbs autocompletetion background!
set cursorline " highlight current line
BufExplorer
Xmodmap
~/.Xmodmap:
! map Capslock as additional Ctrl key
clear Lock
clear Control
keycode 66 = Control_L
add Control = Control_L Control_R
xmodmap ~/.Xmodmap
xmodmap -pke
for a list of all current
- map [ and ] to other keys on German keyboard (?)
Tags
Nerdtree
" Map NERDTreeToggle to convenient key
nmap <leader>n :NERDTreeToggle<cr>
" Set local mapleader
let mapleader = "_"
" a nice shortcut for ppl with french keyboard layout who don't write french
" often; use `r` (replace) to type it nonetheless
map! ç <Esc>
pandoc
pandoc
:autocmd FileType pdc noremap <C-M> :w!<CR>:!pandoc -s -f markdown -t latex % -o %.pdf<CR>
Daniel Hahler
@blueyed
- Use "Space" as leader (not for imap!):
let mapleader = ","
nmap <space> <Leader>
vmap <space> <Leader>
Max
Copy & Paste
"+y
into register clipboard/ctrl+v (+), yank (copy)
"+p
from register clipboard, paste
"*y
into register mouse middle click, yank
"*p
paste ...
set clipboard=unnamed
set clipboard=unnamedplus
vmap <c-c> "*y
Auto Complete (u.a. Ruby)
Matthias Günther
@wikimatze
Syntaxdetection
- vim-polyglot Loading language packs on demand - saves a lot of startup time.
Read the output of a Ex command and paste the output in the current
:r!
(e.g. :r! ls
)
Nice operating system
Startuptime
Browser
wemux
http://martinbrochhaus.com/pair.html
Vim backups
if !isdirectory($HOME . '/.vim/backup')
call mkdir($HOME . '/.vim/backup')
endif
set backupext=~ " backup file extension
set backupdir=$HOME/.vim/backup " directory of backups
set backupcopy=yes " keep attributes of the original file
set backup " save files after close
set writebackup " make a backup of the original file when writing
i3 beautification and setup
Richard
Other things
Desktop-Manager
Vim: Writing
Re-load vimrc when changing it:
au BufWritePost $MYVIMRC,~/.dotfiles/vimrc,$MYVIMRC.local nested :source $MYVIMRC