From e05e73d0f50e3a3c186ec2e7f88579d35a54f127 Mon Sep 17 00:00:00 2001 From: Doyle Date: Wed, 22 Jul 2020 11:02:05 +1000 Subject: [PATCH] Add fixes for Linux --- Installer/_vimrc | 25 +++---------------------- linux_install.sh | 9 +++------ 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/Installer/_vimrc b/Installer/_vimrc index 59c3e76..6032003 100644 --- a/Installer/_vimrc +++ b/Installer/_vimrc @@ -1,31 +1,13 @@ " // Startup /////////////////////////////////////////////////////////////////// " Windows/Linux differences - let s:running_windows = has("win16") || has("win32") || has("win64") -let g:myvimdir ="~/.vim" if s:running_windows let g:myvimdir ="~/vimfiles" -<<<<<<< HEAD:.vimrc -endif - -" Use Vim settings over Vi settings -set nocompatible - -" Enables filetype detection, ftplugins, and indent files -filetype plugin indent on - -" // Vim Plugin Manager //////////////////////////////////////////////////////// -if s:running_windows - call plug#begin('~/vimfiles/plugged') -else - call plug#begin('~/.vim/plugged') -======= silent! call plug#begin('~/vimfiles/plugged') else let g:myvimdir ="~/.vim" silent! call plug#begin('~/.vim/plugged') ->>>>>>> d28479c... Update development environment:Installer/_vimrc endif " {on} Means to lazy-load when that command is invoked @@ -142,7 +124,6 @@ if has("gui_running") au InsertLeave * :set listchars+=trail:■ augroup END else - set term=xterm set t_Co=256 " 256 colors let &t_AB="\e[48;5;%dm" " vodoo magic for CONEMU let &t_AF="\e[38;5;%dm" " vodoo magic for CONEMU @@ -247,9 +228,9 @@ if s:running_windows nnoremap :!start cmd /c run nnoremap :Make else - execute "set =\eb" - execute "set =\en" - execute "set =\ep" + " Set vim terminal to enter normal mode using escape like normal vim behaviour + tnoremap + set makeprg=./build.sh nnoremap :Make endif diff --git a/linux_install.sh b/linux_install.sh index f582de0..2d753f6 100755 --- a/linux_install.sh +++ b/linux_install.sh @@ -1,9 +1,7 @@ -wget --directory-prefix=../.vim/autoload https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -cp -f .vimrc ~/.vimrc +if [[ ! -f "${HOME}/.vim/autoload/plug.vim" ]]; then + wget --directory-prefix=../.vim/autoload https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +fi -<<<<<<< HEAD:linux_setup.sh -sudo apt install tmux -======= if [[ ! -f "${HOME}/.vim/clang-format.py" ]]; then wget --directory-prefix=${HOME}/.vim https://raw.githubusercontent.com/llvm-mirror/clang/master/tools/clang-format/clang-format.py fi @@ -11,7 +9,6 @@ fi cp -f Installer/_vimrc ~/.vimrc sudo apt install silversearcher-ag tmux exuberant-ctags neovim clang-format ->>>>>>> d28479c... Update development environment:linux_install.sh cat > ~/.tmux.conf <