Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
public:vimbashfactory [2012/10/25 15:46] Nicopublic:vimbashfactory [2022/08/04 15:31] (current) – fix indent Nico
Line 4: Line 4:
   * Install it (:source path_to_vim_script)   * Install it (:source path_to_vim_script)
   * Create the following script in .vim/templates/sh:   * Create the following script in .vim/templates/sh:
-<code>+ 
 +<code bash>
 #!/bin/sh #!/bin/sh
  
Line 58: Line 59:
 exit 0 exit 0
 </code> </code>
 +
   * Add the following line in .vimrc:   * Add the following line in .vimrc:
-<code>+ 
 +<code vim>
   au BufWritePost * if getline(1) =~ "^#!" | if getline(1) =~ "/bin/" | silent !chmod a+x <afile> | endif | endif   au BufWritePost * if getline(1) =~ "^#!" | if getline(1) =~ "/bin/" | silent !chmod a+x <afile> | endif | endif
 </code> </code>