Home

Introduction to UNIX Editors

image

Contents

1. RisCitation php 7 22 0 37 6 2011 3 7 RN left hospital spouse gt 35 6 2010 4 12 0 611306922724841 0 13599 lt php 376 2011 3 7 UAP left hospital unkn gt 35 6 2010 4 10 0 442637882500346 0 1762 gt require_once Publication php 38 6 2011 1 1 RN stayed in hospital le gt 35 6 2011 1 1 06 567208096304412 0 1414 gt 38 6 2011 1 1 RN stayed in hospital le gt 35 6 2011 1 2 0 49242293029746 0 12309 f SESSSssssssss 38 6 2011 2 5 RN stayed in hospital le gt 356 2011 1 3 0 410585854718591 0 1346 gt Class for querying Google Scholar and parsing results 396 2010 4 10 RN left hospital job rel gt 356 2011 2 4 0 392664617274659 0 1510 gt If 396 2011 1 1 RN left hospital retirem gt 35 6 2011 2 5 0 381519962633598 0 2001 gt 396 2011 1 3 RN left hospital non job gt 356 2011 2 6 0 572134954369188 0 1454 gt class GoogleScholar 396 2011 2 4 RN stayed in hospital le gt 35 6 2011 3 8 0 448657260696138 0 1742 gt 396 2011 3 7 RN left hospital join tr gt 35 6 2011 3 9 0 486927797162018 0 2125 gt Array of options sent from the calling script 396 2011 3 7 LPN LVN stayed in hospit gt 356 2011 3 7 0 574128151723552 0 1461 gt private options NULL 396 2011 3 9 RN stayed on unit left p gt 36 6 2010 4 10 0 66764656804659 0 1551 gt 396 2011 3 9 RN left hospital perform gt 36 6 2010 4 11 0 652270907068073 0 1315 gt Pear LOG object 40 6 2010 4 11 LPN LVN left hospital p gt 36 6 2010 4
2. Copy entire line and paste Try using the home row for moving around It allows you to navigate your file without moving your hand over to the arrow keys 6 20 2012 k CCR Summer Workshop Series Editors VIM Resources e VIM http www vim org e Cheat Sheets http www viemu com a vi vim heat sheet tutorial html 6 20 2012 CCR Summer Workshop Series Editors raphical c
3. 12 0 5490375790403S5 0 1768 gt private logger NULL 406 2011 1 1 RN stayed in hospital le gt 36 6 2011 1 1 0 527768728727859 0 23769 406 2011 1 2 LPN LVN left hospital j gt 366 2011 1 2 0 612040548541285 0 1899 gt U GoogleScholar php Top 6 74 PHP Abbrev Wed Jun 20 11 00AM 0 4 nurse turnover txt Top 1 0 Text staffing mix txt Top 1 0 Text 6 20 2012 Emacs Modes Every buffer in Emacs has a mode associated with it based on the type of data being displayed Modes modify Emacs behavior to support common operations on the type of file being edited and sets the mode automatically based on the file extension Indentation highlighting of expressions and key words and other language specific features are affected by the mode Modes are highly customizable but that is an advanced topic M x php mode Automatically indents code blocks adds highlighting M x text mode Sets text mode Automatically wraps text at 80 characters can be changed M x auto fill You can turn off auto fill mode while in text mode This can be useful for editing data files 6 20 2012 CCR Summer Workshop Series Editors Emacs Useful Features Symbol completion while programming larL M lt tab gt arList arListOfPublications Entering multiple characters at once lt esc gt 80 Adaptive fill mode Create Simon amp Carol an iRods account Create Simon amp Caro
4. Introduction To Unix Editing Tools Steve Gallo and Andrew Bruno Center for Computational Research University at Buffalo State University of New York CCR Summer Seminar Series 2012 6 20 2012 CCR Summer Workshop Series Editors 1 Introduction There are many editors to choose from both graphical and text based e VIM e Emacs e Gedit e Nano e Sublime Text 2 and the list goes on http en wikipedia org wiki List_of_text_editors 6 20 2012 CCR Summer Workshop Series Editors Review Environment Variables Environment variables control various aspects of your environment and applications These can be set in your login scripts by applications or on the command line bash export EDITOR usr bin emacs csh setenv VISUAL usr bin vi Useful environment variables e EDITOR and VISUAL set the editor used by various applications e PATH A colon separated list of directories searched for applications to run e g PATH bin usr bin usr local bin e HOME Your home directory on the machine 6 20 2012 CCR Summer Workshop Series Editors Review Job Control Unix supports the notion of foreground and background processes When you run an application i e a job from the command line it typically runs in the foreground but you can also run it in the background using the amp operator Run emacs in the foreground The shell waits for you to exit emacs S
5. as a file is contained in a buffer e A buffer doesn t have to contain data from a file e Every buffer has a name typically the name of the file e You can switch between buffers using C leftmouse in graphical mode or C x b e You can split buffers to view several on the screen at once Regions e Aregion is a marked area within a buffer e g a selection e Many operon can be on an entire buffer or a region class GoogleScholar Buffer Region private gsRawResult NULL Internal pointer for f ii records private recordIndex 0 List of parsed publications private publications array U GoogleScholar php Top 16 47 PHP Abbrev Wed Jun 20 11 13AM 0 82 4 6 20 2012 CCR Summer Workshop Series Editors Emacs Moving Around The arrow keys let you move around easily within Emacs but to be more productive you can also use command keys arrows up down left right C p C n C b C f up down left right C arrow Same as arrow but moves a whole word C a or Home key Move to the beginning of the line also works in the shell C e or End key Move to the end of the line also works in the shell C v and M v Page down and Page up M g g Go to line I aliased this to M and yes stole it from vi M lt and M gt Move to the top of the buffer and move to the bottom Why use C a instead of the home key or C f instead of the arrow Isn t that crazy No If you ha
6. e a buffer to its file C xs Save all modified buffers C x C w Save as C x C c Exit asks to save any modified buffers 6 20 2012 CCR Summer Workshop Series Editors The Emacs Window SETE See Se Soa S fa lt php require_once Publication php Pfi SSS SSS SSS SSS SSS SSS SSS SSS SSS SSS SS SS SS SS SS SS SS SS SS SS SS SS SS SSS SS SS SS SS SS SS SS SSS SS SS SS SS SS SS SS SS SS SS SS SS Class for querying Google Scholar and parsing results rfi SS SS SSS SSS SSS SSS SS SSS SSS SS SS SS SS SS SS SS SS SS LL class GoogleScholar lt _ Cursor point Array of options sent from the calling script private options NULL Raw HTML result returned by google scholar private gsRawResult NULL Internal pointer for parsing records private recordIndex Q List of parsed publications Buffer private publications array a A A a a public function __construct array options LOG logger NULL this gt logger logger Buffer name this gt options options requiredOptions array cookie_file wait_time fos author max_results_per_page save_raw_data max_results C fetch_citations U GoogleScholar php Top 8 19 Abbrev Wed Jun 20 10 39AM 0 87 EE Buffer status Minibuffer Cursor position Mode 6 20 2012 CCR Summer Workshop Series Editors Emacs Buffers and Regions Buffers e Any text being edited such
7. emacs test c Run emacs in the background you are returned to the shell S emacs test c amp Use C z to suspend an job and return to the shell Type bg to continue running the job in the background or fg to return to the job Useful for suspending a job to perform a task and then returning to it For example Use vi to edit a file but you forgot to do something and don t want to lose your place vi test c AT The less command is now suspended cp some file jobs 1 Stopped vi test c fg Now you re back in vi where you left off 6 20 2012 CCR Summer Workshop Series Editors Emacs and Vim are commonly installed on Unix systems Topics e Opening and saving files navigating selection cut and paste e Auto completion syntax highlighting modes e Advanced editing buffers regions e Exercises Advanced Topics for Programmers e Customizations e Remote editing 6 20 2012 CCR Summer Workshop Series Editors Emacs Guided Tour http www gnu org software emacs tour Online Manual http www gnu org software emacs manual html_mono emacs html Need a better editor for Windows Use Emacs http ftp gnu org gnu emacs windows Help from within Emacs M x info M x help 6 20 2012 CCR Summer Workshop Series Editors Emacs Notation M x is used to run a command Stands for Meta x modifier and means press the escape key followed by x For exam
8. isCitation Init_id hospital_id year quarter month c gt unit_id hospital_id year quarter month gt 34 6 2010 4 10 RN stayed in hospital le gt 34 6 2010 4 10 0 546740276046312 0 2720 gt private rawData 34 6 2010 4 11 RN stayed in hospital le gt d 34 6 2010 4 11 0 566249075345855 0 2330 gt private url NULI 34 6 2011 1 1 LPN LVN stayed in hospit gt 346 2010 4 12 0 530785643253022 0 2292 gt private file NULL 346 2011 1 1 LPN LVN left hospital o gt 346 2011 1 2 0 469612504234256 0 1900 gt private data array 346 2011 2 5 RN left hospital retirem gt 346 2011 1 3 0 470693196670069 0 1518 gt 34 6 2011 3 7 LPN LVN left hospital o gt 346 2011 1 1 0 470238851108548 0 27169 Mapping between RIS tags and citation data members 346 2011 3 7 LPN LVN left hospital c gt 346 2011 2 6 0 529720499951962 0 1764 gt tf 35 6 2010 4 11 RN stayed in hospital le gt 346 2011 2 4 0 569446267149659 0 1966 gt See http en wikipedia org wiki RIS_ 28file_format 29 35 6 2011 3 9 RN left hospital perform gt 346 2011 2 5 0 506677671119694 0 1744 gt 36 6 2011 1 1 RN stayed in hospital le gt 346 2011 3 7 0 430970887176693 0 1433 gt private tagMap array TY gt 36 6 2011 1 1 UAP stayed in hospital gt 346 2011 3 8 0 530644079598447 0 20299 Tl gt ti 36 6 2011 2 5 RN stayed in hospital le gt 346 2011 3 9 0 612713577283853 0 1877 gt Al gt 37 6 2011 1 3 RN left hospital retirem gt 35 6 2010 4 11 0 61318456623591 0 1596 gt
9. l an iRods account Multiple zones connected to 2 different Multiple zones connected to 2 different irods instances split Michigan irods instances split Michigan public private Search fields Rule to read public private metadata from imported file and add to metadata Search fields Rule to read metadata from imported file and add to metadata Undo M lt tab gt Cycle through possible symbol completions lt esc gt lt number gt lt char gt Insert lt number gt of lt char gt M x filladapt mode Enable adaptive fill mode C x u Undo recent editing 6 20 2012 CCR Summer Workshop Series Editors 6 20 2012 CCR Summer Workshop Series Editors Introduction Emacs is a hideous monstrosity but a functional one On the other hand vi is a masterpiece of elegance Sort of like a Swiss Army knife versus a rapier The Cult of vi 6 20 2012 CCR Summer Workshop Series Editors vi was originally written by Bill Joy in 1976 while at Berkeley Bill Joy is a co founder of Sun Microsystems and creator of csh among many others vi is based off ex and ed the original line editor for Unix written by Ken Thompson 6 20 2012 CCR Summer Workshop Series Editors e vi has many ports and clones e VIM is a vi clone written by Bram Moolenaar that adds many advanced features e VIM Vi IMproved First public release was in 1991 VIM is included with almost every Linux distribution e Also has a GUI ve
10. ple M x tetris starts a tetris game Use tab twice to see all commands that start with a string or all available options lick lt mouse 2 gt on a completion to select it In this buffer type RET to select the completion near point Possible completions are zua pretix copy handler cua prefix cut handler cua prefix override handler cua prefix repeat handler cua shift control c prefix cua shift control x prefix cua cancel cua copy region cua cut region cua debug cua delete region cua exchange point and mark cua help for region cua mode cua paste cua paste pop cua repeat replace region cua replace region cua scroll down cua scroll up cua selection mode cua set mark cua set rectangle mark cua toggle global mark U Completions All 1 0 Completion List Wed Jun 20 10 29AM 0 93 M x cua C x is a shortcut for a command typically followed by a command key Press the control key at the same time as x typically followed by a shortcut key For example C x C s will save your file 6 20 2012 CCR Summer Workshop Series Editors Emacs Entering and Exiting Files Two modes of operation In its own window graphical mode or within a terminal text mode useful for editing files remotely Run emacs in no window mode within a terminal emacs nw GoogleScholar php Run emacs in its own window in the background emacs GoogleScholar php amp How do exit Emacs and save my work C x C s Sav
11. posite corner C x rk Kill the rectangle C xry Yank a killed rectangle C xro Insert blank space into the marked rectangle moving the current contents to the right C xrc Clear the rectangle leaving a blank space 6 20 2012 CCR Summer Workshop Series Editors Emacs Opening Files Emacs can open several files at once either from the command line or within Emacs itself Open two files The files will be displayed in a split window emacs GoogleScholar php sample txt amp When opening a file from within emacs you can use tab completion to browse for a file or enter dired directory edit mode to select a file C x C f Browse or open a file C x C r Browse or open a file read only C x k Kill the current buffer and close the file 6 20 2012 CCR Summer Workshop Series Editors Emacs Viewing Multiple Files You ll often be working on multiple files and will want to view them at the same time You can open multiple buffers or windows frames split the window horizontally or split the window vertically C x 2 Split the current buffer horizontally into two C x 3 Split the current buffer vertically into two C xo Switch to other buffer cycles through multiple buffers C x 0 Delete the current window C x1 Delete all windows EXCEPT the current window C x52 Open a new window frame in Emacs speak dmx ABekKEbaexe dmx So keearaexKe class R
12. rsion called gVim 6 20 2012 CCR Summer Workshop Series Editors VIM Basics VIM is a modal editor e Three basic modes of operation insert visual and command e By default VIM is run in command mode Each mode is accessed by pressing a key and ESC returns to command mode e To insert text you need to switch to insert mode by pressing i e Visual mode allows you to highlight text To enter visual mode press v e To view the VIM user manual type help or help command e Even will explain the meaning of life help 42 6 20 2012 CCR Summer Workshop Series Editors 22 VIM Entering and Exiting Files Type vim or just vi in the shell to start When vim starts you ll be in normal command mode Run vim S vim hello world c How do exit vim and save my work W Save a buffer to its file wa Save all modified buffers w newfile Save as q Exit q Exit without saving changes 6 20 2012 CCR Summer Workshop Series Editors VIM Moving Around While in command mode Key k j h arrows w 0 zero C f and C b 12g or 12 lt Enter gt gg G ESC yy P up down left right up down left right Same as above but moves a whole word Move to the beginning of the line Move to the end of the line Page down and Page up Go to line example go to line 12 Move to the top of the buffer and move to the bottom Return to command mode Search forward and Search reverse
13. ve one hand on the keyboard and one on the mouse every time you take your hand off of the mouse to click a key it slows you down The same is true for copy and paste if you take your hands off the keyboard to use the mouse menu it slows you down Learning shortcuts can make you more productive 6 20 2012 CCR Summer Workshop Series Editors 11 Emacs Cut and Paste Cut and paste in emacs is called kill and yank Killing text puts that text into a buffer that you can then yank back out C k Kill a line from the cursor to the end of the line C y Yank the contents of the kill buffer back into the document C d Delete a single character under the cursor Backspace Delete the character before the cursor M x cua mode Don t like C k and C y Set Common User Access CUA mode C x C c C v and C z become cut copy paste and undo Cut and paste also works with regions Select a region using the mouse in graphical mode or command keys Move the cursor to another location and kill the text in the region Regions are useful more to come C lt space gt Set the mark at the cursor C w Kill from the mark to the cursor 6 20 2012 CCR Summer Workshop Series Editors Emacs Working With Rectangles We often need to operate on rectangular regions of text within a document Delete a column move it elsewhere clear a column etc To select a rectangle set the mark at one corner and move the cursor to the op

Download Pdf Manuals

image

Related Search

Related Contents

Kenroy Home 32656ASIL Installation Guide  Emerson CAT6-5 Warranties    OP MAG N°37.indd  EX-6 series 油圧ショベル    user manual  

Copyright © All rights reserved.
Failed to retrieve file