vim - step to install plugin editorconfig and new version of indent script
This commit is contained in:
51
seqs/vim.sh
51
seqs/vim.sh
@@ -1,7 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
toolName=vim
|
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
|
# Get script working directory
|
||||||
# (when called from a different directory)
|
# (when called from a different directory)
|
||||||
@@ -36,27 +37,49 @@ step_1() {
|
|||||||
exe apt install vim $APTOPT
|
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_alias() { ALIAS="setup"; }
|
||||||
step_2() {
|
step_2() {
|
||||||
echoseq " [I] Installing formating rules"
|
if [ ! -e "$seqVimIndentLoc" ]; then
|
||||||
addConf -s "$seqVimConfig" "$seqVimConfigLoc"
|
exe mkdir -p $(dirname "$seqVimIndentLoc")
|
||||||
|
cd $(dirname "$seqVimIndentLoc")
|
||||||
echoseq " [I] Installing indentation script $seqVimIndentLoc"
|
|
||||||
[ ! -e "$seqVimIndentLoc" ] && \
|
|
||||||
exep mkdir -p $(dirname "$seqVimIndentLoc") "&&" \
|
|
||||||
cd $(dirname "$seqVimIndentLoc") "&&" \
|
|
||||||
wget --content-disposition $indentDownUrl
|
wget --content-disposition $indentDownUrl
|
||||||
|
fi
|
||||||
|
|
||||||
|
echoseq " [I] Installing indentation rules"
|
||||||
|
addConf -c "$seqVimConfigBasic" "$seqVimConfigLoc"
|
||||||
}
|
}
|
||||||
seqVimIndentLoc="$HOME/.vim/indent/sh.vim"
|
seqVimIndentLoc="$HOME/.vim/indent/sh.vim"
|
||||||
seqVimConfigLoc="$HOME/.vimrc"
|
seqVimConfigBasic="set t_TI= t_TE=
|
||||||
seqVimConfig="set t_TI= t_TE=
|
|
||||||
filetype plugin indent on
|
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 tabstop=2
|
||||||
set softtabstop=2
|
set softtabstop=2
|
||||||
set shiftwidth=2
|
set shiftwidth=2"
|
||||||
syntax on"
|
|
||||||
|
|
||||||
VERSION_SEQREV=15
|
VERSION_SEQREV=15
|
||||||
. /usr/local/bin/sequencer.sh
|
. /usr/local/bin/sequencer.sh
|
||||||
|
Reference in New Issue
Block a user