vim - step to install plugin editorconfig and new version of indent script

This commit is contained in:
2022-03-14 20:50:16 +01:00
parent fb67ff42f4
commit bb8b54597a

View File

@@ -1,7 +1,8 @@
#!/bin/bash
toolName=vim
indentDownUrl="https://www.vim.org/scripts/download_script.php?src_id=4371"
indentDownUrl="https://www.vim.org/scripts/download_script.php?src_id=27565"
seqVimConfigLoc="$HOME/.vimrc"
# Get script working directory
# (when called from a different directory)
@@ -36,27 +37,49 @@ step_1() {
exe apt install vim $APTOPT
}
step_2_info() { echo "Setup for sequencer development"; }
step_2_info() { echo "Installing indentation script $seqVimIndentLoc"; }
step_2_alias() { ALIAS="setup"; }
step_2() {
echoseq " [I] Installing formating rules"
addConf -s "$seqVimConfig" "$seqVimConfigLoc"
if [ ! -e "$seqVimIndentLoc" ]; then
exe mkdir -p $(dirname "$seqVimIndentLoc")
cd $(dirname "$seqVimIndentLoc")
wget --content-disposition $indentDownUrl
fi
echoseq " [I] Installing indentation script $seqVimIndentLoc"
[ ! -e "$seqVimIndentLoc" ] && \
exep mkdir -p $(dirname "$seqVimIndentLoc") "&&" \
cd $(dirname "$seqVimIndentLoc") "&&" \
wget --content-disposition $indentDownUrl
echoseq " [I] Installing indentation rules"
addConf -c "$seqVimConfigBasic" "$seqVimConfigLoc"
}
seqVimIndentLoc="$HOME/.vim/indent/sh.vim"
seqVimConfigLoc="$HOME/.vimrc"
seqVimConfig="set t_TI= t_TE=
seqVimConfigBasic="set t_TI= t_TE=
filetype plugin indent on
set expandtab
syntax on"
step_3_info() { echo "Install editorconfig as vim 8 plugin"; }
step_3_alias() { ALIAS="editorconfig"; }
step_3() {
local ecDir="$HOME/.vim/pack/editorconfig/start"
local ecUrl='https://github.com/editorconfig/editorconfig-vim.git'
if [ ! -e "$ecDir" ]; then
echoseq " [I] Installing editorconfig plugin"
exe mkdir -p "$ecDir"
exe cd "$ecDir"
exe git clone "$ecUrl"
else
echoseq " [I] Upgrading editorconfig plugin"
exe cd "$ecDir"
exe git pull
fi
}
step_10_info() { echo "Setup $HOME/.vimrc globaly to use spaces and indent 2"; }
step_10() {
echoseq " [I] Installing formating rules"
addConf -a "$seqVimConfig" "$seqVimConfigLoc"
}
seqVimConfig="set expandtab
set tabstop=2
set softtabstop=2
set shiftwidth=2
syntax on"
set shiftwidth=2"
VERSION_SEQREV=15
. /usr/local/bin/sequencer.sh