Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
public:vimbashfactory [2010/08/23 23:50] – Nico | public:vimbashfactory [2022/08/04 15:31] (current) – fix indent Nico | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~META:How to quickly create fully fonctionnal shell scripts using VIM~~ | + | ====== How to quickly create fully functional |
- | ====== How to quickly create fully fonctionnal | + | |
* Download the [[http:// | * Download the [[http:// | ||
* Install it (:source path_to_vim_script) | * Install it (:source path_to_vim_script) | ||
* Create the following script in .vim/ | * Create the following script in .vim/ | ||
- | < | + | |
- | #!/bin/bash | + | < |
+ | #!/bin/sh | ||
VERSION=" | VERSION=" | ||
Line 60: | Line 59: | ||
exit 0 | exit 0 | ||
</ | </ | ||
+ | |||
* Add the following line in .vimrc: | * Add the following line in .vimrc: | ||
- | < | + | |
+ | < | ||
au BufWritePost * if getline(1) =~ " | au BufWritePost * if getline(1) =~ " | ||
</ | </ | ||
* That's it! next time you will edit a new .sh file, it will load the template and automagicaly made it executable :) | * That's it! next time you will edit a new .sh file, it will load the template and automagicaly made it executable :) | ||
+ |