after some grep, sed and awk’ing I had sorted out a bunch of foldernames into a file, feelin’ smug about it.
I needed those on one line, using vim the only hinder was my not-so-super-skills in vim .
In vim command mode, typing ‘18000J’ would join current line with the next 18000 lines
I’ve google’ed this one countless times. I’ll store it here
When vim doesn’t recognize what kind of syntax highlighting to use you can set it manually with
: set syn=sh
(in vim command mode)
If you wonder what syntax highlighting modes are available, in Fedora (and I see Ubuntu and Debian got them at the same place) they’re here:
[joar@saturn syntax]$ pwd
[joar@saturn syntax]$ ls | sed 's/\.vim//' | head # showing only the first 10 ones
FreeBSD got those in /usr/local/share/vim/vim73/syntax/
Thnx linuxquestions.org. Though I found that:
nmap <C-V> "+gP
imap < C-V > < ESC >< C-V >a
vmap <C-C> "+y
Worked better, issuing the ‘a’ (for append) instead of the vi ‘i’ (insert) command after pasting txt (add 1 space after the a as well).
After installing my favourite distro, which these days seem to have fallen back on Ubuntu I’m usually installing the ‘vim-gnome’ package. It pulls down the necessary packages for me to have a fully fledged Vim editor with syntax highlighting and so on.
But what if I don’t have X installed ?
Trying to install vim-gnome then would pull down xorg + the complete gnome-desktop environment, which really isn’t that necessary.
Since there’s a lot of packages related to vim it could be a bit confusing which one to pull down just to have syntax highlighting.
# aptitude install vim-nox
gives you, in _my_ opinion, a working and useful Vim editor in a ‘non-X’ environment :p