Explorar el Código

Change setup.sh to bash, fix auto-chmod, update vim-plug

Setup script is set to use a bash executable, as some distributions
invoke alternative shells that do no support `'-o pipefail'` e.g.
Debian/Ubuntu symlinks `sh` to `dash`.

Vim shell commands (e.g. !chmod) stop pipe from being an effective vim
command separator as it gets send to the shell command as an argument.
Weiyi Lou hace 10 años
padre
commit
7b0e9890f3
Se han modificado 3 ficheros con 3 adiciones y 3 borrados
  1. 1 1
      setup.sh
  2. 1 1
      vim/autoload/plug.vim
  3. 1 1
      vim/settings/templates.vim

+ 1 - 1
setup.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -euo pipefail
 IFS=$'\n\t'
 

+ 1 - 1
vim/autoload/plug.vim

@@ -399,7 +399,7 @@ function! s:lod(names, types)
 endfunction
 
 function! s:lod_ft(pat, names)
-  call s:lod(a:names, ['plugin', 'after/plugin'])
+  call s:lod(a:names, ['plugin', 'after/plugin', 'syntax', 'after/syntax'])
   execute 'autocmd! PlugLOD FileType' a:pat
   if exists('#filetypeplugin#FileType')
     doautocmd filetypeplugin FileType

+ 1 - 1
vim/settings/templates.vim

@@ -3,4 +3,4 @@
 autocmd BufNewFile *.sh 0r ~/dotfiles/vim/templates/bashscript | 2,$ g/^#/d | normal G
 
 " Make shell scripts executable on save.
-autocmd BufWritePost *.sh if getline(1) =~ "^#!/bin/" | silent !chmod +x <afile> | endif
+autocmd BufWritePost *.sh if getline(1) =~ "^#!/bin/" | silent !chmod +x <afile>