diff --git a/linuxSetup/_vimrc.forWindows b/linuxSetup/raspberry/programs/vim/_vimrc.forWindows similarity index 100% rename from linuxSetup/_vimrc.forWindows rename to linuxSetup/raspberry/programs/vim/_vimrc.forWindows diff --git a/linuxSetup/init.vim b/linuxSetup/raspberry/programs/vim/init.vim similarity index 100% rename from linuxSetup/init.vim rename to linuxSetup/raspberry/programs/vim/init.vim diff --git a/linuxSetup/instVim.sh b/linuxSetup/raspberry/programs/vim/instVim.sh similarity index 100% rename from linuxSetup/instVim.sh rename to linuxSetup/raspberry/programs/vim/instVim.sh diff --git a/linuxSetup/wsl/programs/vim/_vimrc.forWindows b/linuxSetup/wsl/programs/vim/_vimrc.forWindows new file mode 100644 index 0000000..241ebe4 --- /dev/null +++ b/linuxSetup/wsl/programs/vim/_vimrc.forWindows @@ -0,0 +1,155 @@ +" Vim with all enhancements +source $VIMRUNTIME/vimrc_example.vim + +" Mouse behavior (the Unix way) +behave xterm + +" Use the internal diff if available. +" Otherwise use the special 'diffexpr' for Windows. +if &diffopt !~# 'internal' + set diffexpr=MyDiff() +endif +function MyDiff() + let opt = '-a --binary ' + if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif + if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif + let arg1 = v:fname_in + if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif + let arg1 = substitute(arg1, '!', '\!', 'g') + let arg2 = v:fname_new + if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif + let arg2 = substitute(arg2, '!', '\!', 'g') + let arg3 = v:fname_out + if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif + let arg3 = substitute(arg3, '!', '\!', 'g') + if $VIMRUNTIME =~ ' ' + if &sh =~ '\ ' . arg3 + if exists('l:shxq_sav') + let &shellxquote=l:shxq_sav + endif +endfunction + + +language en_US.utf8 + + + + +"BASICS-------------------------------------------------------------- +set exrc ""You can get some cuntomizations if therre is a vimrc on the local eare that you are it wiil use it. +set guicursor= ""Bi cursor for oldstyle lovers. +set relativenumber ""Show the line beofre and ofetr starting from your line +set noerrorbells ""No sound effects. +set tabstop=4 ""TabSize of 4 +set shiftwidth=4 ""Indentation fo 4 +set softtabstop=4 ""Enabeling it will remplace tabs by spaces in insert mode +set noexpandtab ""Enabeling it will remplace tabs by spaces +set smartindent ""will try it's best to indent for you. +set nowrap ""Will continue to go right when line is too long +set incsearch ""incremental searching as i am typing the words will be highligted. +set number ""Self explanatory +set scrolloff=8 ""Will start to scroll down wehn there is still 8 Lines before end of page. +:autocmd InsertEnter,InsertLeave * set cul! + +"Backup and Undo +set noswapfile ""No swap file. they are anoying +set nobackup ""Nobackup because we will do a undo dir +set undodir=~/vimfiles/undodir +set undofile + +packadd termdebug +let g:termdebug_wide=1 + +filetype plugin indent on +syntax enable + +"PLUGINS------------------------------------------------------------- +call plug#begin('~/vimfiles/pluggin/') +Plug 'gruvbox-community/gruvbox' +Plug 'arcticicestudio/nord-vim' +Plug 'vim-utils/vim-man' +Plug 'mbbill/undotree' +call plug#end() +"-------------------------------------------------------------------- + +"VISUALS------------------------------------------------------------- +set colorcolumn=100 +highlight ColorColumn ctermbg=0 guibg=lightgrey +set signcolumn=yes +colorscheme gruvbox +"https://vi.stackexchange.com/questions/27599/colorscheme-displayed-wrongly-with-neovim +let g:gruvbox_termcolors=16 +set termguicolors +set background=dark + + +"REMAPS-------------------------------------------------------------- +let mapleader=" " +"Ease of window jumg intead of ^wj etc.. +map h :wincmd h +map j :wincmd j +map k :wincmd k +map l :wincmd l +map u :UndotreeShow +map db :Termdebug :vertical resize 30 +noremap ts :Step +noremap to :Over +noremap tn :Next +noremap tc :Cont +map pv :Sex! :vertical resize 30 +map ,/ :s/^/\/\// +map ,{ :s/);/)\r{\r\t\r}\r/g +"-------------------------------------------------------------------- + +"FILE BROWSING------------------------------------------------------- +let g:netrw_banner=0 " disable annoying banner +let g:netrw_browse_split=4 " open in prior window +let g:netrw_altv=1 " open splits to the right +let g:netrw_liststyle=3 " tree view + + " NOW WE CAN: + " - :edit a folder to open a file browser + " - /v/t to open in an h-split/v-split/tab + " - check |netrw-browse-maps| for more mappings +"PLUGINS------------------------------------------------------------- +"-------------------------------------------------------------------- + +"SNIPPETS------------------------------------------------------------ +" Command Read template move cursor +nnoremap ,html :-1read $HOME/.vim/.skeleton.html3jwf>a + +" NOW WE CAN: +" - Take over the world! +" (with much fewer keystrokes) +"-------------------------------------------------------------------- + +"BUILD INTEGRATION--------------------------------------------------- +" Steal Mr. Bradley's formatter & add it to our spec_helper +" http://philipbradley.net/rspec-into-vim-with-quickfix +" Configure the `make` command to run RSpec +set makeprg=bundle\ exec\ rspec\ -f\ QuickfixFormatter + + " NOW WE CAN: + " - Run :make to run RSpec + " - :cl to list errors + " - :cc# to jump to error by number + " - :cn and :cp to navigate forward and back +"-------------------------------------------------------------------- + + + + + diff --git a/linuxSetup/wsl/programs/vim/init.vim b/linuxSetup/wsl/programs/vim/init.vim new file mode 100644 index 0000000..ec455ef --- /dev/null +++ b/linuxSetup/wsl/programs/vim/init.vim @@ -0,0 +1,144 @@ +"BASICS-------------------------------------------------------------- +set exrc ""You can get some cuntomizations if therre is a vimrc on the local eare that you are it wiil use it. +set guicursor= ""Bi cursor for oldstyle lovers. +set relativenumber ""Show the line beofre and ofetr starting from your line +set noerrorbells ""No sound effects. +set tabstop=4 ""TabSize of 4 +set shiftwidth=4 ""Indentation fo 4 +set softtabstop=4 ""Enabeling it will remplace tabs by spaces in insert mode +set noexpandtab ""Enabeling it will remplace tabs by spaces +set smartindent ""will try it's best to indent for you. +set nowrap ""Will continue to go right when line is too long +set incsearch ""incremental searching as i am typing the words will be highligted. +set number ""Self explanatory +set scrolloff=8 ""Will start to scroll down wehn there is still 8 Lines before end of page. + +"Backup and Undo +set noswapfile ""No swap file. they are anoying +set nobackup ""Nobackup because we will do a undo dir +set undodir=~/.vim/undodir +set undofile + +packadd termdebug +let g:termdebug_wide=1 + +filetype plugin indent on +syntax enable + +:autocmd InsertEnter,InsertLeave * set cul! +"-------------------------------------------------------------------- + +"PLUGINS------------------------------------------------------------- +call plug#begin('~/.vim/plugged') +Plug 'gruvbox-community/gruvbox' +Plug 'arcticicestudio/nord-vim' +Plug 'vim-utils/vim-man' +Plug 'mbbill/undotree' +Plug 'gyim/vim-boxdraw' +Plug 'vim-airline/vim-airline' +""Plug 'theprimeagen/vim-be-good' +call plug#end() +"-------------------------------------------------------------------- + +"VISUALS------------------------------------------------------------- +set colorcolumn=100 +highlight ColorColumn ctermbg=0 guibg=lightgrey +set signcolumn=yes + +colorscheme gruvbox +set background=dark +highlight Normal guibg=blue + +" lightline +"" set noshowmode +""let g:lightline = { 'colorscheme': 'nord' } +"-------------------------------------------------------------------- + +"REMAPS-------------------------------------------------------------- +let mapleader=" " +"Ease of window jumg intead of ^wj etc.. +map h :wincmd h +map j :wincmd j +map k :wincmd k +map l :wincmd l +map u :UndotreeShow +map db :Termdebug :vertical resize 30 +noremap ts :Step +noremap to :Over +noremap tn :Next +noremap tc :Cont +map pv :Sex! :vertical resize 30 +map ,/ :s/^/\/\// +map ,{ :s/);/)\r{\r\t\r}\r/g +map ra ebvey :%s/0/ +"-------------------------------------------------------------------- + +"WILDMENU FOR FUZZY FILE SEARCH-------------------------------------- +filetype plugin on "plugins(included with vim) for netrw +set path+=** + +set wildmenu "Display all matching files when we tab complete + " NOW WE CAN: + " Type :find + " - Hit tab to :find by partial match + " - Use * to make it fuzzy + " - Opened files will be buffered try it out + " - :b lets you autocomplete any open buffer +"-------------------------------------------------------------------- + +"TAG JUMPING--------------------------------------------------------- +" Create the `tags` file (need to install ctags first) +command! MakeTags !ctags -R . + " NOW WE CAN: + " - Use ^] to jump to tag under cursor + " - Use g^] for ambiguous tags + " - Use ^t to jump back up the tag stack + " THINGS TO CONSIDER: + " - This doesn't help if you want a visual list of tags + " AUTOCOMPLETE: + " The good stuff is documented in |ins-completion| + " HIGHLIGHTS: + " - ^x^n for JUST this file + " - ^x^f for filenames (works with our path trick!) + " - ^x^] for tags only + " - ^n for anything specified by the 'complete' option + " NOW WE CAN: + " - Use ^n and ^p to go back and forth in the suggestion list +"-------------------------------------------------------------------- + +"FILE BROWSING------------------------------------------------------- +let g:netrw_banner=0 " disable annoying banner +let g:netrw_browse_split=4 " open in prior window +let g:netrw_altv=1 " open splits to the right +let g:netrw_liststyle=3 " tree view +let g:netrw_list_hide=netrw_gitignore#Hide() +let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+' + + " NOW WE CAN: + " - :edit a folder to open a file browser + " - /v/t to open in an h-split/v-split/tab + " - check |netrw-browse-maps| for more mappings +"PLUGINS------------------------------------------------------------- +"-------------------------------------------------------------------- + +"SNIPPETS------------------------------------------------------------ +" Command Read template move cursor +nnoremap ,html :-1read $HOME/.vim/.skeleton.html3jwf>a + +" NOW WE CAN: +" - Take over the world! +" (with much fewer keystrokes) +"-------------------------------------------------------------------- + +"BUILD INTEGRATION--------------------------------------------------- +" Steal Mr. Bradley's formatter & add it to our spec_helper +" http://philipbradley.net/rspec-into-vim-with-quickfix +" Configure the `make` command to run RSpec +set makeprg=bundle\ exec\ rspec\ -f\ QuickfixFormatter + + " NOW WE CAN: + " - Run :make to run RSpec + " - :cl to list errors + " - :cc# to jump to error by number + " - :cn and :cp to navigate forward and back +"-------------------------------------------------------------------- diff --git a/linuxSetup/wsl/programs/vim/instVim.sh b/linuxSetup/wsl/programs/vim/instVim.sh new file mode 100755 index 0000000..f9415ea --- /dev/null +++ b/linuxSetup/wsl/programs/vim/instVim.sh @@ -0,0 +1,68 @@ +#!/bin/bash + +VIMVER="vim" + +DOTCONFIG="/home/$USER/.config" +LOCALVIMRC="init.vim" + +VIMRC="/home/$USER/.vimrc" +VIMDIR="/home/$USER/" + +NVIMRC="/home/$USER/.config/nvim/init.vim" +NVIMDIR="/home/$USER/.config/nvim/" + +CURDATE=$(date +%m%d%Y%H%M%S) + +#sudo apt install -y exuberant-ctags +#sudo apt install -y curl + +echo $CURDATE + +if [[ $VIMVER = "neovim" ]] +then + echo Installing NEOVIM + sudo apt install -y neovim + curl -fLo ~/.var/app/io.neovim.nvim/data/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + + if [ -d "$DOTCONFIG" ]; + then + echo "$DOTCONFIG existst and will not be created" + else + mkdir $DOTCONFIG + fi + + if [ -d "$NVIMDIR" ]; + then + echo "$NVIMDIR existst and will not be created" + else + mkdir $NVIMDIR + fi + + if [ -f $NVIMRC ]; + then + echo Backing the old config file with the current date + cp $NVIMRC "$NVIMRC"."$CURDATE" + cp $LOCALVIMRC $NVIMDIR + else + cp $LOCALVIMRC $NVIMDIR + fi + +else + echo Installing VIM + sudo apt install -y vim + curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + + if [ -f $VIMRC ]; + then + echo Backing the old config file with the current date + cp $VIMRC "$VIMRC"."$CURDATE" + cp $LOCALVIMRC $VIMDIR + cd $VIMDIR + mv $LOCALVIMRC .vimrc + else + cp $LOCALVIMRC $VIMDIR + cd $VIMDIR + mv $LOCALVIMRC .vimrc + fi +fi + diff --git a/linuxSetup/x86/programs/vim/_vimrc.forWindows b/linuxSetup/x86/programs/vim/_vimrc.forWindows new file mode 100644 index 0000000..241ebe4 --- /dev/null +++ b/linuxSetup/x86/programs/vim/_vimrc.forWindows @@ -0,0 +1,155 @@ +" Vim with all enhancements +source $VIMRUNTIME/vimrc_example.vim + +" Mouse behavior (the Unix way) +behave xterm + +" Use the internal diff if available. +" Otherwise use the special 'diffexpr' for Windows. +if &diffopt !~# 'internal' + set diffexpr=MyDiff() +endif +function MyDiff() + let opt = '-a --binary ' + if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif + if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif + let arg1 = v:fname_in + if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif + let arg1 = substitute(arg1, '!', '\!', 'g') + let arg2 = v:fname_new + if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif + let arg2 = substitute(arg2, '!', '\!', 'g') + let arg3 = v:fname_out + if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif + let arg3 = substitute(arg3, '!', '\!', 'g') + if $VIMRUNTIME =~ ' ' + if &sh =~ '\ ' . arg3 + if exists('l:shxq_sav') + let &shellxquote=l:shxq_sav + endif +endfunction + + +language en_US.utf8 + + + + +"BASICS-------------------------------------------------------------- +set exrc ""You can get some cuntomizations if therre is a vimrc on the local eare that you are it wiil use it. +set guicursor= ""Bi cursor for oldstyle lovers. +set relativenumber ""Show the line beofre and ofetr starting from your line +set noerrorbells ""No sound effects. +set tabstop=4 ""TabSize of 4 +set shiftwidth=4 ""Indentation fo 4 +set softtabstop=4 ""Enabeling it will remplace tabs by spaces in insert mode +set noexpandtab ""Enabeling it will remplace tabs by spaces +set smartindent ""will try it's best to indent for you. +set nowrap ""Will continue to go right when line is too long +set incsearch ""incremental searching as i am typing the words will be highligted. +set number ""Self explanatory +set scrolloff=8 ""Will start to scroll down wehn there is still 8 Lines before end of page. +:autocmd InsertEnter,InsertLeave * set cul! + +"Backup and Undo +set noswapfile ""No swap file. they are anoying +set nobackup ""Nobackup because we will do a undo dir +set undodir=~/vimfiles/undodir +set undofile + +packadd termdebug +let g:termdebug_wide=1 + +filetype plugin indent on +syntax enable + +"PLUGINS------------------------------------------------------------- +call plug#begin('~/vimfiles/pluggin/') +Plug 'gruvbox-community/gruvbox' +Plug 'arcticicestudio/nord-vim' +Plug 'vim-utils/vim-man' +Plug 'mbbill/undotree' +call plug#end() +"-------------------------------------------------------------------- + +"VISUALS------------------------------------------------------------- +set colorcolumn=100 +highlight ColorColumn ctermbg=0 guibg=lightgrey +set signcolumn=yes +colorscheme gruvbox +"https://vi.stackexchange.com/questions/27599/colorscheme-displayed-wrongly-with-neovim +let g:gruvbox_termcolors=16 +set termguicolors +set background=dark + + +"REMAPS-------------------------------------------------------------- +let mapleader=" " +"Ease of window jumg intead of ^wj etc.. +map h :wincmd h +map j :wincmd j +map k :wincmd k +map l :wincmd l +map u :UndotreeShow +map db :Termdebug :vertical resize 30 +noremap ts :Step +noremap to :Over +noremap tn :Next +noremap tc :Cont +map pv :Sex! :vertical resize 30 +map ,/ :s/^/\/\// +map ,{ :s/);/)\r{\r\t\r}\r/g +"-------------------------------------------------------------------- + +"FILE BROWSING------------------------------------------------------- +let g:netrw_banner=0 " disable annoying banner +let g:netrw_browse_split=4 " open in prior window +let g:netrw_altv=1 " open splits to the right +let g:netrw_liststyle=3 " tree view + + " NOW WE CAN: + " - :edit a folder to open a file browser + " - /v/t to open in an h-split/v-split/tab + " - check |netrw-browse-maps| for more mappings +"PLUGINS------------------------------------------------------------- +"-------------------------------------------------------------------- + +"SNIPPETS------------------------------------------------------------ +" Command Read template move cursor +nnoremap ,html :-1read $HOME/.vim/.skeleton.html3jwf>a + +" NOW WE CAN: +" - Take over the world! +" (with much fewer keystrokes) +"-------------------------------------------------------------------- + +"BUILD INTEGRATION--------------------------------------------------- +" Steal Mr. Bradley's formatter & add it to our spec_helper +" http://philipbradley.net/rspec-into-vim-with-quickfix +" Configure the `make` command to run RSpec +set makeprg=bundle\ exec\ rspec\ -f\ QuickfixFormatter + + " NOW WE CAN: + " - Run :make to run RSpec + " - :cl to list errors + " - :cc# to jump to error by number + " - :cn and :cp to navigate forward and back +"-------------------------------------------------------------------- + + + + + diff --git a/linuxSetup/x86/programs/vim/init.vim b/linuxSetup/x86/programs/vim/init.vim new file mode 100644 index 0000000..ec455ef --- /dev/null +++ b/linuxSetup/x86/programs/vim/init.vim @@ -0,0 +1,144 @@ +"BASICS-------------------------------------------------------------- +set exrc ""You can get some cuntomizations if therre is a vimrc on the local eare that you are it wiil use it. +set guicursor= ""Bi cursor for oldstyle lovers. +set relativenumber ""Show the line beofre and ofetr starting from your line +set noerrorbells ""No sound effects. +set tabstop=4 ""TabSize of 4 +set shiftwidth=4 ""Indentation fo 4 +set softtabstop=4 ""Enabeling it will remplace tabs by spaces in insert mode +set noexpandtab ""Enabeling it will remplace tabs by spaces +set smartindent ""will try it's best to indent for you. +set nowrap ""Will continue to go right when line is too long +set incsearch ""incremental searching as i am typing the words will be highligted. +set number ""Self explanatory +set scrolloff=8 ""Will start to scroll down wehn there is still 8 Lines before end of page. + +"Backup and Undo +set noswapfile ""No swap file. they are anoying +set nobackup ""Nobackup because we will do a undo dir +set undodir=~/.vim/undodir +set undofile + +packadd termdebug +let g:termdebug_wide=1 + +filetype plugin indent on +syntax enable + +:autocmd InsertEnter,InsertLeave * set cul! +"-------------------------------------------------------------------- + +"PLUGINS------------------------------------------------------------- +call plug#begin('~/.vim/plugged') +Plug 'gruvbox-community/gruvbox' +Plug 'arcticicestudio/nord-vim' +Plug 'vim-utils/vim-man' +Plug 'mbbill/undotree' +Plug 'gyim/vim-boxdraw' +Plug 'vim-airline/vim-airline' +""Plug 'theprimeagen/vim-be-good' +call plug#end() +"-------------------------------------------------------------------- + +"VISUALS------------------------------------------------------------- +set colorcolumn=100 +highlight ColorColumn ctermbg=0 guibg=lightgrey +set signcolumn=yes + +colorscheme gruvbox +set background=dark +highlight Normal guibg=blue + +" lightline +"" set noshowmode +""let g:lightline = { 'colorscheme': 'nord' } +"-------------------------------------------------------------------- + +"REMAPS-------------------------------------------------------------- +let mapleader=" " +"Ease of window jumg intead of ^wj etc.. +map h :wincmd h +map j :wincmd j +map k :wincmd k +map l :wincmd l +map u :UndotreeShow +map db :Termdebug :vertical resize 30 +noremap ts :Step +noremap to :Over +noremap tn :Next +noremap tc :Cont +map pv :Sex! :vertical resize 30 +map ,/ :s/^/\/\// +map ,{ :s/);/)\r{\r\t\r}\r/g +map ra ebvey :%s/0/ +"-------------------------------------------------------------------- + +"WILDMENU FOR FUZZY FILE SEARCH-------------------------------------- +filetype plugin on "plugins(included with vim) for netrw +set path+=** + +set wildmenu "Display all matching files when we tab complete + " NOW WE CAN: + " Type :find + " - Hit tab to :find by partial match + " - Use * to make it fuzzy + " - Opened files will be buffered try it out + " - :b lets you autocomplete any open buffer +"-------------------------------------------------------------------- + +"TAG JUMPING--------------------------------------------------------- +" Create the `tags` file (need to install ctags first) +command! MakeTags !ctags -R . + " NOW WE CAN: + " - Use ^] to jump to tag under cursor + " - Use g^] for ambiguous tags + " - Use ^t to jump back up the tag stack + " THINGS TO CONSIDER: + " - This doesn't help if you want a visual list of tags + " AUTOCOMPLETE: + " The good stuff is documented in |ins-completion| + " HIGHLIGHTS: + " - ^x^n for JUST this file + " - ^x^f for filenames (works with our path trick!) + " - ^x^] for tags only + " - ^n for anything specified by the 'complete' option + " NOW WE CAN: + " - Use ^n and ^p to go back and forth in the suggestion list +"-------------------------------------------------------------------- + +"FILE BROWSING------------------------------------------------------- +let g:netrw_banner=0 " disable annoying banner +let g:netrw_browse_split=4 " open in prior window +let g:netrw_altv=1 " open splits to the right +let g:netrw_liststyle=3 " tree view +let g:netrw_list_hide=netrw_gitignore#Hide() +let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+' + + " NOW WE CAN: + " - :edit a folder to open a file browser + " - /v/t to open in an h-split/v-split/tab + " - check |netrw-browse-maps| for more mappings +"PLUGINS------------------------------------------------------------- +"-------------------------------------------------------------------- + +"SNIPPETS------------------------------------------------------------ +" Command Read template move cursor +nnoremap ,html :-1read $HOME/.vim/.skeleton.html3jwf>a + +" NOW WE CAN: +" - Take over the world! +" (with much fewer keystrokes) +"-------------------------------------------------------------------- + +"BUILD INTEGRATION--------------------------------------------------- +" Steal Mr. Bradley's formatter & add it to our spec_helper +" http://philipbradley.net/rspec-into-vim-with-quickfix +" Configure the `make` command to run RSpec +set makeprg=bundle\ exec\ rspec\ -f\ QuickfixFormatter + + " NOW WE CAN: + " - Run :make to run RSpec + " - :cl to list errors + " - :cc# to jump to error by number + " - :cn and :cp to navigate forward and back +"-------------------------------------------------------------------- diff --git a/linuxSetup/x86/programs/vim/instVim.sh b/linuxSetup/x86/programs/vim/instVim.sh new file mode 100755 index 0000000..f9415ea --- /dev/null +++ b/linuxSetup/x86/programs/vim/instVim.sh @@ -0,0 +1,68 @@ +#!/bin/bash + +VIMVER="vim" + +DOTCONFIG="/home/$USER/.config" +LOCALVIMRC="init.vim" + +VIMRC="/home/$USER/.vimrc" +VIMDIR="/home/$USER/" + +NVIMRC="/home/$USER/.config/nvim/init.vim" +NVIMDIR="/home/$USER/.config/nvim/" + +CURDATE=$(date +%m%d%Y%H%M%S) + +#sudo apt install -y exuberant-ctags +#sudo apt install -y curl + +echo $CURDATE + +if [[ $VIMVER = "neovim" ]] +then + echo Installing NEOVIM + sudo apt install -y neovim + curl -fLo ~/.var/app/io.neovim.nvim/data/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + + if [ -d "$DOTCONFIG" ]; + then + echo "$DOTCONFIG existst and will not be created" + else + mkdir $DOTCONFIG + fi + + if [ -d "$NVIMDIR" ]; + then + echo "$NVIMDIR existst and will not be created" + else + mkdir $NVIMDIR + fi + + if [ -f $NVIMRC ]; + then + echo Backing the old config file with the current date + cp $NVIMRC "$NVIMRC"."$CURDATE" + cp $LOCALVIMRC $NVIMDIR + else + cp $LOCALVIMRC $NVIMDIR + fi + +else + echo Installing VIM + sudo apt install -y vim + curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + + if [ -f $VIMRC ]; + then + echo Backing the old config file with the current date + cp $VIMRC "$VIMRC"."$CURDATE" + cp $LOCALVIMRC $VIMDIR + cd $VIMDIR + mv $LOCALVIMRC .vimrc + else + cp $LOCALVIMRC $VIMDIR + cd $VIMDIR + mv $LOCALVIMRC .vimrc + fi +fi + diff --git a/wsl/windowsTools/goto.sh b/scripts/wsl/wsl/windowsTools/goto.sh similarity index 100% rename from wsl/windowsTools/goto.sh rename to scripts/wsl/wsl/windowsTools/goto.sh diff --git a/wsl/windowsTools/mail.sh b/scripts/wsl/wsl/windowsTools/mail.sh similarity index 100% rename from wsl/windowsTools/mail.sh rename to scripts/wsl/wsl/windowsTools/mail.sh diff --git a/wsl/windowsTools/onenote.sh b/scripts/wsl/wsl/windowsTools/onenote.sh similarity index 100% rename from wsl/windowsTools/onenote.sh rename to scripts/wsl/wsl/windowsTools/onenote.sh diff --git a/wsl/windowsTools/windowsOpen.sh b/scripts/wsl/wsl/windowsTools/windowsOpen.sh similarity index 100% rename from wsl/windowsTools/windowsOpen.sh rename to scripts/wsl/wsl/windowsTools/windowsOpen.sh