diff options
author | bnewbold <bnewbold@robocracy.org> | 2012-03-06 00:37:07 -0500 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2012-03-06 00:39:27 -0500 |
commit | 3dd1ca29a21847a411a9aa645c610ac40d4101b0 (patch) | |
tree | 73b0e0e3d2ea9187b7fd991b36dfc17cf7c27a15 /software | |
parent | 4766ded55444137bb30e6e23827f99c9cbed1c2a (diff) | |
download | knowledge-3dd1ca29a21847a411a9aa645c610ac40d4101b0.tar.gz knowledge-3dd1ca29a21847a411a9aa645c610ac40d4101b0.zip |
split vim screens (slime-like)
Diffstat (limited to 'software')
-rw-r--r-- | software/vim.page | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/software/vim.page b/software/vim.page index fb821f0..32743ea 100644 --- a/software/vim.page +++ b/software/vim.page @@ -4,7 +4,7 @@ toc: no ... ============ -It's vim! +It's vim! ============ Typical .vimrc @@ -34,14 +34,15 @@ Search and replace globally:: :%s/before/after/g - +Tricks +------------- I often want to pull a particular gnarly line or two from another file; here's the command I use to grab three lines of context around 'phrase':: :r!grep -A 3 'phrase' ../otherfile.txt -Pasting a lot of text with insert mode if very slow because vim redraws the -terminal for every single character entered (as you would want if you were +Pasting a lot of text with insert mode if very slow because vim redraws the +terminal for every single character entered (as you would want if you were actually typing. To paste in the contents of the X11 clipboard you want to use:: "*P @@ -66,8 +67,31 @@ Search for trailing whitespace, or just strip it all:: /\s\+$ :%s/\s\+$// +Shell Sessions +------------------- +(discovered via +http://www.ktaylor.name/2009/11/vim-screen-lisp-programming-environment.html) + +The emacs embeded interpreter mode is very nice for interactively programming +with languages like scheme and python. A similar effect can be achieved with +the `ScreenShell plugin +<http://www.vim.org/scripts/script.php?script_id=2711>`_ and the following +bindings: + + vmap <C-c><C-c> :ScreenSend<CR> + nmap <C-c><C-c> vip<C-c><C-c> + nmap <C-x><C-e> :ScreenSend<CR> + +`Slimv <http://www.vim.org/scripts/script.php?script_id=2531>`_ is a more +elaborate alternative (SLIME for vim). + +Multi-Tab Setup +-------------------- +TODO: document my current multi-window configuration, how to re-scale, etc. + +``Ctrl-W =`` equalizes window sizes (``Ctrl-W`` is the vierport meta sequence). + Links to more... ------------------ - - `vim anti-patterns <http://blog.sanctum.geek.nz/vim-anti-patterns/>`_ - + - `vim anti-patterns <http://blog.sanctum.geek.nz/vim-anti-patterns/>`_
\ No newline at end of file |