tips and tricks for everything but emacs
Posted: Tue Feb 17, 2015 4:16 am
We have a T&T for emacs, so let's have one for everything else. Post the things you use in nano, vim, tmux, even cmus, moc, and anything else you can think of. What shortcut keys or configs work for you?
I already posted about using nano buffers to load more than one file at once here: http://linuxbbq.org/bbs/viewtopic.php?f ... 132#p37123
The things I use in vim every day:
And I use tmux all the time. I usually have two ratpoison windows open -- one for firefox, and the other for tmux. I use tmux like a CLI window manager. In tmux I usually have one multi-pane window for terminals, a second full window for weechat, and a third window for ssh to my nfs server. Assuming "P" means "prefix" (which I have defined as ctrl-A, but you may have as ctrl-B in a default tmux config, I use these sequences every day:
Very basic.
You have probably also seen my tmux.conf, where I redefine the window split commands to the function keys. Nothing fancy like gutterslob or DJ's configs, but it works for me.
What interesting keybinds or configs do you use?
(thamks dkeg and gekkop for encouraging me to start this thread)
I already posted about using nano buffers to load more than one file at once here: http://linuxbbq.org/bbs/viewtopic.php?f ... 132#p37123
The things I use in vim every day:
Code: Select all
function! NuTriState() " toggle through line-number modes
if(&rnu) " turn off line numbering
set nonu
set nornu
elseif(&nu) " normal numbers on, add relative numbers (hybrid mode)
set rnu
else " normal numbers off, turn them on
set nu
endif
endfunc
nnoremap <silent><F2> :call NuTriState()<cr>
" select lines in visual mode, ,ic adds # comments, ,rc removes
map ,ic :s/^/#/g<CR>:let @/ = ""<CR>
map ,rc :s/^#//g<CR>:let @/ = ""<CR>
Code: Select all
P-z : toggle pane full screen
P-! : split pane into a new window
P-c : create new window
P-<n> : goto window <n>
You have probably also seen my tmux.conf, where I redefine the window split commands to the function keys. Nothing fancy like gutterslob or DJ's configs, but it works for me.
What interesting keybinds or configs do you use?
(thamks dkeg and gekkop for encouraging me to start this thread)