Linux 21 Ekim 2016

vi komutları

Vi yi başlatmak* vi filename edit filename starting at line 1 vi -r filename recover filename that was being edited when system crashedVi den çıkmak* :x quit vi, writing out modified file to file named in original invocation :wq quit vi, writing out modified file to file named in original invocation :q quit (or exit) vi* :q! quit vi even though latest changes have not been saved for this vi callVi de Cursor a hareket ettirmekDüzeneleme yapmak* i insert text before cursor, until hit I insert text at beginning of current line, until hit* a append text after cursor, until hit A append text to end of current line, until hit* o open and put text in a new line below current line, until hit* O open and put text in a new line above current line, until hitVi de Metinleri toplu düzenleme bulma* r replace single character under cursor (no needed) R replace characters, starting with current cursor position, until hit cw change the current word with new text, starting with the character under cursor, until hit cNw change N words beginning with character under cursor, until hit; e.g., c5w changes 5 words C change (replace) the characters in the current line, until hit cc change (replace) the entire current line, stopping when is hit Ncc or cNc change (replace) the next N lines, starting with the current line,stopping when is hitVi Dokuman içerisinde hareket etmek için ^f move forward one screen ^b move backward one screen ^d move down (forward) one half screen ^u move up (back) one half screen ^l redraws the screen ^r redraws the screen, removing deleted linesVi Silmek için* x delete single character under cursor Nx delete N characters, starting with character under cursor dw delete the single word beginning with character under cursor dNw delete N words beginning with character under cursor; e.g., d5w deletes 5 words D delete the remainder of the line, starting with current cursor position* dd delete entire current line Ndd or dNd delete N lines, beginning with the current line; e.g., 5dd deletes 5 linesVi de kopyala yapıştıryy copy (yank, cut) the current line into the buffer Nyy or yNy copy (yank, cut) the next N lines, including the current line, into the buffer p put (paste) the line(s) in the buffer into the text after the current linearama yapma/string search forward for occurrence of string in text ?string search backward for occurrence of string in text n move to next occurrence of search string N move to next occurrence of search string in opposite directionVi de Satır sayısını bulma:.= returns line number of current line at bottom of screen := returns the total number of lines at bottom of screen ^g provides the current line number, along with the total number of lines,in the file at the bottom of the screenVi de Dosyayı kaydetme ve okuma:r filename read file named filename and insert after current line (the line with cursor) :w write current contents to file named in original vi call :w newfile write current contents to a new file named newfile :12,35w smallfile write the contents of the lines numbered 12 through 35 to a new file named smallfile :w! prevfile write current contents over a pre-existing file named prevfile