Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
public:vimbashfactory [2010/08/23 23:11] – created Nico | public:vimbashfactory [2022/08/04 15:31] (current) – fix indent Nico | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to quickly create fully fonctionnal | + | ====== How to quickly create fully functional |
* 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 28: | Line 28: | ||
#echo $# | #echo $# | ||
- | if [ $# == 0 ] ; then echo " | + | if [ $# -lt 1 ] ; then echo " |
eval set -- " | eval set -- " | ||
Line 50: | Line 50: | ||
NONE=" | NONE=" | ||
fi | fi | ||
+ | |||
SAMPLEMESSAGE=" | SAMPLEMESSAGE=" | ||
Line 58: | 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 :) | ||
+ |