Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:vi [2015/12/18 13:48] – tmadelinux:vi [2026/04/07 16:08] (current) – [Visual Mode] tmade
Line 12: Line 12:
   \>                   #A word ends with   \>                   #A word ends with
   :set hlsearch        #Highlight spaces   :set hlsearch        #Highlight spaces
 +  %                    #Jump to closing bracket, when curser is on "{" or "}"
 +  #                    #Jump to function, when curser is on function or where the function is called (and vice versa)
      
 ==== Edit ==== ==== Edit ====
Line 26: Line 28:
   ct"                  #Change all until tag "   ct"                  #Change all until tag "
   .                    #Repeat last command/ insert etc.   .                    #Repeat last command/ insert etc.
-    +  :%d                  #Clear all lines
 ==== Replace ==== ==== Replace ====
  
Line 48: Line 50:
   :5                  #Jump to line 5   :5                  #Jump to line 5
   :set list           #Show special caracters   :set list           #Show special caracters
 +  :w !sudo tee %      #Save file with sudo rights
 +  :wq !sudo tee %     #Save and quit file with sudo rights
 +  :set paste          #to avoid linefeeds by pasting code
 +  :set nopaste        #switch off "paste"
 +  :syntax on
 +  :syntax off         #highlighting - e.g. red color - off
      
 +====Visual Mode====
 +If you can´t enter text with putty and right mouse click, set
 +  set mouse-=a
 +in file 
 +  ~/.vimrc
 +
 +or
 +
 +  :set mouse=
 +  
 +inside VI.
 +  
 +Adapt to it - with mouse mode turned on, the new way to paste is 
 +  shift-right-click 
 +
 +====Multi-edit====
 +To edit various lines:
 +
 +  - strg +v
 +  - mark all lines with arrow up/ down
 +  - press "I" (shift i)
 +  - press tab or space
 +  - escape
 +  
 +
 +
  
      
linux/vi.1450442936.txt.gz · Last modified: (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki