Показаны сообщения с ярлыком vim. Показать все сообщения
Показаны сообщения с ярлыком vim. Показать все сообщения

вторник, 25 августа 2015 г.

vim

\c is good to know when your working on other people's stations.
/\croot

:set ic
:set scs

четверг, 20 мая 2010 г.

Unix Toolbox

source: http://cb.vu/unixtoolbox.xhtml
http://sleepyhead.de

Unix Toolbox


This document is a collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users. This is a practical guide with concise explanations, however the reader is supposed to know what s/he is doing.




Unix Toolbox revision 14.2

The latest version of this document can be found at http://cb.vu/unixtoolbox.xhtml. Replace .xhtml on the link with .pdf for the PDF version and with .book.pdf for the booklet version. On a duplex printer the booklet will create a small book ready to bind. This XHTML page can be converted into a nice PDF document with a CSS3 compliant application (see the script example). See also the about page.

Error reports and comments are most welcome - c@cb.vu Colin Barschel.

© Colin Barschel 2007-2009. Some rights reserved under Creative Commons.


System

Hardware | Statistics | Users | Limits | Runlevels | root password | Compile kernel | Repair grub

Running kernel and system information

# uname -a # Get the kernel version (and BSD version)
# lsb_release -a # Full release info of any LSB distribution
# cat /etc/SuSE-release # Get SuSE version
# cat /etc/debian_version # Get Debian version

четверг, 13 мая 2010 г.

Best Vim Tips

http://vim.wikia.com/wiki/Best_Vim_Tips

Ctrl+X Ctrl+F = insert filename in current dir
C^+N = autocomplite word
C^r+" or C^r+ = paste in edit mode or to command line/search
C^x+C^l = autocomplite line

~/.vimrc

set number  
set expandtab
set textwidth=79
set tabstop=8
set softtabstop=4
set shiftwidth=4
set autoindent

syntax on

http://stackoverflow.com/questions/164847/what-is-in-your-vimrc

:%s/fred/joe/igc : general substitute command
:%s/\r//g : delete DOS Carriage Returns (^M)
:'a,'bg/fred/s/dick/joe/gc : VERY USEFUL
:s/\(.*\):\(.*\)/\2 : \1/ : reverse fields separated by :
# non-greedy matching \{-}
:%s/^.\{-}pdf/new.pdf/ : to first pdf)
:s/fred/a/g : substitute "fred" with contents of register "a"
CTRL-R CTRL-W : pull word under the cursor into a command line or search
:%s/^\(.*\)\n\1/\1$/ : delete duplicate lines
:help /\{-}
# multiple commands
:%s/\f\+\.gif\>/\r&\r/g | v/\.gif$/d | %s/gif/jpg/
:%s/suck\|buck/loopy/gc : ORing
:s/__date__/\=strftime("%c")/ : insert datestring