Week -9 vim contd.. and System Configuration tools
Put (paste), Undoing changes P or p – paste copied or deleted data p - puts the data below the current line or after the cursor P – puts the data above the current line or before the cursor Undoing changes: Command Mode u – undo most recent change U – undo all changes to the current line since the cursor landed on the line Ctrl-r – redo last undone change
Visual mode Allows selection of blocks of text v – starts character-oriented highlighting V – starts line-oriented highlighting Activated with mouse in gvim visual keys can be used in conjunction with movement keys: w, ), }, arrows etc Highlighted text can be deleted, yanked, changed or filtered, search/replaced etc.
Using multiple windows Multiple documents can be viewed in a single vim screen ctrl-w, s splits the screen horizontally ctrl-w, v splits the screen vertically ctrl-w, Arrow moves between windows Ex-mode instructions always affect the current window :help windows displays more window commands
Configuring vi and vim Configuring on the fly :set or :set all Configuring permanently ~/.vimrc or ~/.exrc A few common configuration items :set number :set autoindent :set textwidth=65 (vim only) :set wrapmargin = 15 :set ignorecase Run :help option-list for a complete list
System Configuration tools
system-config-printer System ->Administration ->printer Supported printer connections: Local (parallel, serial or usb) Unix/Linux print server Windows print server Netware print server HP JetDirect Configuration stored in /etc/cups/printers.conf
Printing Commands Ipr sends a job to the queue to be printed Accepts ASCII, PostScript, PDF, others Ipq views the contents of the queue Iprm removes a job from the queue System V printing commands such as lp, lpstat and cancel are also supported.
Printing Utilities evince views PDF documents lpstat –a lists configured printers enscript and a2ps convert text to PostScript ps2pdf converts PostScript to PDF mpage prints multiple pages per sheet
Setting the Systems Date and Time GUI: system-config-date System->Administration->Date & Time Can set date/time manually or use NTP Additional NTP servers can be added Can use local time or UTC CLI: date [MMDDhhmm[[CC]YY][.ss]] #date #date