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 [2023/09/27 15:37] – [Orcale] 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+  %                    #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 51: Line 52:
   :w !sudo tee %      #Save file with sudo rights   :w !sudo tee %      #Save file with sudo rights
   :wq !sudo tee %     #Save and quit 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==== ====Visual Mode====
-If you can´t enter text with putty and right mouse click, set +If you can´t enter text with putty and right mouse click, set
   set mouse-=a   set mouse-=a
 in file  in file 
Line 66: Line 71:
 Adapt to it - with mouse mode turned on, the new way to paste is  Adapt to it - with mouse mode turned on, the new way to paste is 
   shift-right-click    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.1695821849.txt.gz · Last modified: by tmade
 
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