Skip to content

Commit

Permalink
add vim skeletons
Browse files Browse the repository at this point in the history
  • Loading branch information
nicopernas committed Oct 31, 2022
1 parent 1d70601 commit acc21ca
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 2 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ install_all() {
/~https://github.com/neoclide/coc.nvim.git
)

ln -fs "$script_dir/skeletons" "$HOME/.vim/skeletons"

for url in "${plugins[@]}"; do
git clone --depth=1 "$url" "$HOME/.vim/bundle/$( basename "$url" )"
done
Expand Down
3 changes: 3 additions & 0 deletions skeletons/bash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -euo pipefail

5 changes: 5 additions & 0 deletions skeletons/perl.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env perl

use strict;
use warnings;

1 change: 1 addition & 0 deletions skeletons/python.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#!/usr/bin/env python3
12 changes: 6 additions & 6 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ autocmd BufWinEnter * if index(ignore_spell_check, &filetype) < 0
set completeopt-=preview

"Abreviatura
abbr #i #include
abbr #d #define
abbr ddperl #!/usr/bin/env perl<CR><CR>use strict;<CR>use warnings;<CR>
abbr ddbash #!/usr/bin/env bash<CR>set -euo pipefail<CR>
abbr ddpython #!/usr/bin/env python3
abbr ddtest void test () {<CR><CR>}
iabbr #i #include
iabbr #d #define

autocmd BufNewFile *.sh 0r ~/.vim/skeletons/bash.sh
autocmd BufNewFile *.py 0r ~/.vim/skeletons/python.py
autocmd BufNewFile *.pl 0r ~/.vim/skeletons/perl.pl

" disable auto comment
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
Expand Down

0 comments on commit acc21ca

Please sign in to comment.