From b550a87ceca5449a9687f5861c3e7cb6e7b2bd1a Mon Sep 17 00:00:00 2001 From: Christian Chiarulli Date: Sun, 10 Feb 2019 15:17:03 -0500 Subject: began new config --- .gitignore | 2 + .netrwhist | 4 + README.md | 2 - init.vim | 360 +--------------------------------------------------- installer.sh | 86 ------------- modules/general.vim | 11 ++ modules/plugins.vim | 33 +++++ modules/theme.vim | 21 +++ old/README.md | 2 + old/init.vim | 356 +++++++++++++++++++++++++++++++++++++++++++++++++++ old/installer.sh | 86 +++++++++++++ old/setupDEB.sh | 23 ++++ old/setupRHEL.sh | 2 + setupDEB.sh | 23 ---- setupRHEL.sh | 2 - tags | 105 --------------- utils/installer.sh | 86 +++++++++++++ 17 files changed, 630 insertions(+), 574 deletions(-) create mode 100644 .gitignore create mode 100644 .netrwhist delete mode 100644 README.md delete mode 100644 installer.sh create mode 100644 modules/general.vim create mode 100644 modules/plugins.vim create mode 100644 modules/theme.vim create mode 100644 old/README.md create mode 100644 old/init.vim create mode 100644 old/installer.sh create mode 100755 old/setupDEB.sh create mode 100755 old/setupRHEL.sh delete mode 100755 setupDEB.sh delete mode 100755 setupRHEL.sh delete mode 100644 tags create mode 100644 utils/installer.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..0c697532 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dein +tags diff --git a/.netrwhist b/.netrwhist new file mode 100644 index 00000000..5b777612 --- /dev/null +++ b/.netrwhist @@ -0,0 +1,4 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =2 +let g:netrw_dirhist_1='/Users/chris/.config/nvim/old' +let g:netrw_dirhist_2='/Users/chris/.config' diff --git a/README.md b/README.md deleted file mode 100644 index b4e8a53f..00000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# nvim -Neovim config diff --git a/init.vim b/init.vim index 946a7b0a..6db0eb2b 100644 --- a/init.vim +++ b/init.vim @@ -1,356 +1,4 @@ - -"""""""""" HOUSEKEEPING """""""""" -syntax on -set nowrap -set encoding=utf8 -set mouse=a -set splitbelow -set splitright -set t_Co=256 -set autochdir -" saving -nnoremap :w -nnoremap :wq! -" escape can blow me -nnoremap -" Set Proper Tabs -set tabstop=4 -set shiftwidth=4 -set smarttab -set expandtab -" Always display the status line -set laststatus=2 -" Gets rid of highlights after search -"nnoremap :nohlsearch -" Line numbers -set number -" Toggle line numbers -nnoremap :10split term://bash -nnoremap :BuffergatorToggle -nnoremap :Files -nnoremap :SearchTasks * -nnoremap :NERDTreeToggle -nnoremap :set nonumber! -nnoremap :nohlsearch -nnoremap :TagbarToggle -nnoremap :vsplit -nnoremap :split -nnoremap :only - -" insert mode for terminal -autocmd BufWinEnter,WinEnter term://* startinsert -autocmd BufLeave term://* stopinsert - -" Be iMproved -if &compatible - set nocompatible -endif - -" Remap window switch -nnoremap h -nnoremap j -nnoremap k -nnoremap l -" Remap terminal switch -tnoremap -tnoremap -tnoremap h -tnoremap j -tnoremap k -tnoremap l -" : completion. -inoremap pumvisible() ? "\" : "\" -" Enable Elite mode, No ARRRROWWS!!!! -let g:elite_mode=1 -" Disable arrow movement, resize splits instead. -if get(g:, 'elite_mode') - nnoremap :resize -2 - nnoremap :resize +2 - nnoremap :vertical resize -2 - nnoremap :vertical resize +2 -endif -nnoremap :bnext -nnoremap :bprevious -let mapleader = "," -"""""""""" END HOUSEKEEPING """""""""" - -"""""""""" PLUGINS """""""""" -" Required: -set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim - -" Required: -if dein#load_state('~/chris/.cache/dein') - call dein#begin('~/.cache/dein') - - " Let dein manage dein - " Required: - call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim') - - " Start Screen - call dein#add('mhinz/vim-startify') - " Search Index shows how many instances of searched term - call dein#add('google/vim-searchindex') - " line indents - "call dein#add('Yggdroot/indentLine') - " Gutentags - call dein#add('ludovicchabant/vim-gutentags') - "call dein#add('steffanc/cscopemaps.vim') - "call dein#add('brookhong/cscope.vim') - "call dein#add('vim-scripts/autoload_cscope.vim') - " Tagbar - call dein#add('majutsushi/tagbar') - " Add or remove your plugins here: TODO - call dein#add('Shougo/neosnippet.vim') - call dein#add('Shougo/neosnippet-snippets') - " Themes - call dein#add('liuchengxu/space-vim-dark') - call dein#add('nightsense/stellarized') - call dein#add('vim-airline/vim-airline') - "call dein#add('itchyny/lightline.vim') - call dein#add('vim-airline/vim-airline-themes') - call dein#add('chriskempson/base16-vim') - " Auto Pairs - call dein#add('jiangmiao/auto-pairs') - " Buffergator use \b - call dein#add('jeetsukumaran/vim-buffergator') - " Ctrlp - call dein#add('ctrlpvim/ctrlp.vim') - " Searchtasks searches for TODO, FIXME, XXX and such run :SearchTasks . - call dein#add('gilsondev/searchtasks.vim') - "Syntax - call dein#add('w0rp/ale') - call dein#add('arakashic/chromatica.nvim') - "Git - call dein#add('airblade/vim-gitgutter') - call dein#add('tpope/vim-fugitive') - " Multiple Cursors - call dein#add('terryma/vim-multiple-cursors') - " NERDTree - call dein#add('scrooloose/nerdtree') - call dein#add('scrooloose/nerdcommenter') - " FZF - call dein#add('junegunn/fzf.vim', { 'dir': '~/.fzf', 'do': './install --all' }) - "call dein#add('junegunn/fzf') - " BufOnly use :BufOnly to unload all or pass it a single buffer - call dein#add('vim-scripts/BufOnly.vim') - " For autocomplete - call dein#add('zchee/deoplete-jedi') - call dein#add('Shougo/deoplete.nvim') - " For Web Development - call dein#add('pangloss/vim-javascript') - call dein#add('elzr/vim-json') - call dein#add('mxw/vim-jsx') - call dein#add('mattn/emmet-vim') - call dein#add('prettier/vim-prettier', {'do': 'yarn install'}) - " Auto flow - call dein#add('wokalski/autocomplete-flow') - " For vim 8+ - if !has('nvim') - call dein#add('roxma/nvim-yarp') - call dein#add('roxma/vim-hug-neovim-rpc') - endif - - " You can specify revision/branch/tag. - call dein#add('Shougo/deol.nvim', { 'rev': '01203d4c9' }) - - " Required: - call dein#end() - call dein#save_state() -endif - -" Required: -filetype plugin indent on -syntax enable - -" If you want to install not installed plugins on startup. -if dein#check_install() - call dein#install() -endif - -"""""""""" END PLUGINS """""""""" - -"""""""""" SPACEVIM THEME """""""""" - -" Set theme TODO kill this light theme -if strftime('%H') >= 7 && strftime('%H') < 7 - set background=light - colorscheme stellarized -else - set background=dark - colorscheme space-vim-dark - - " Range: 233 (darkest) ~ 238 (lightest) - " Default: 235 - let g:space_vim_dark_background = 233 - color space-vim-dark - hi Comment guifg=#5C6370 ctermfg=59 - let base16colorspace=256 " Access colors present in 256 colorspace - if !empty(glob("/usr/lib/rpm/redhat")) - "Lightline - if !exists('g:airline_symbols') - let g:airline_symbols = {} - endif - - " unicode symbols - let g:airline_left_sep = '»' - let g:airline_left_sep = '▶' - let g:airline_right_sep = '«' - let g:airline_right_sep = '◀' - let g:airline_symbols.crypt = '🔒' - let g:airline_symbols.linenr = '☰' - let g:airline_symbols.linenr = '␊' - let g:airline_symbols.linenr = '␤' - let g:airline_symbols.linenr = '¶' - let g:airline_symbols.maxlinenr = '' - let g:airline_symbols.maxlinenr = '㏑' - let g:airline_symbols.branch = '⎇' - let g:airline_symbols.paste = 'ρ' - let g:airline_symbols.paste = 'Þ' - let g:airline_symbols.paste = '∥' - let g:airline_symbols.spell = 'Ꞩ' - let g:airline_symbols.notexists = 'Ɇ' - let g:airline_symbols.whitespace = 'Ξ' - - " powerline symbols - let g:airline_left_sep = '' - let g:airline_left_alt_sep = '' - let g:airline_right_sep = '' - let g:airline_right_alt_sep = '' - let g:airline_symbols.branch = '' - let g:airline_symbols.readonly = '' - let g:airline_symbols.linenr = '☰' - let g:airline_symbols.maxlinenr = '' - - " old vim-powerline symbols - let g:airline_left_sep = '⮀' - let g:airline_left_alt_sep = '⮁' - let g:airline_right_sep = '⮂' - let g:airline_right_alt_sep = '⮃' - let g:airline_symbols.branch = '⭠' - let g:airline_symbols.readonly = '⭤' - let g:airline_symbols.linenr = '⭡' - - "let g:loaded_airline = 1 - "set showtabline=2 - "set noshowmode - "let g:lightline = { - " \ 'colorscheme': 'jellybeans', - " \ 'active': { - " \ 'left': [['mode', 'paste'], - " \ ['gitbranch', 'readonly', 'filename', 'modified'] ] - " \ }, - " \ 'component_function': { - " \ 'gitbranch': 'fugitive#head' - " \ }, - " \ } - else - - "Airline - set noshowmode - let g:airline_theme='violet' - let g:airline#extensions#tabline#enabled = 1 - let g:airline_powerline_fonts = 1 - let g:hybrid_custom_term_colors = 1 - if !exists('g:airline_symbols') - let g:airline_symbols = {} - let g:airline_symbols.space = "\ua0" - endif - endif -endif -" Enable highlighting of the current line -set cursorline -"""""""""" END THEME """""""""" - -"""""""""" BEGIN CONFIGS """""""""" - -" Deoplete -let g:deoplete#enable_at_startup = 1 -" NeoSnippet -let g:neosnippet#enable_completed_snippet = 1 -imap (neosnippet_expand_or_jump) -smap (neosnippet_expand_or_jump) -xmap (neosnippet_expand_target) -" Startify -let g:startify_custom_header = [ - \ ' _ __ _ ', - \ ' / | / /__ ____ _ __(_)___ ___ ', - \ ' / |/ / _ \/ __ \ | / / / __ `__ \', - \ ' / /| / __/ /_/ / |/ / / / / / / /', - \ ' /_/ |_/\___/\____/|___/_/_/ /_/ /_/ '] - -" Tagbar -"nmap :TagbarToggle -" NERDTree -"nmap :NERDTreeToggle -let NERDTreeShowHidden = 1 -" SearchTasks -"nmap :SearchTasks * -"""""""""" END CONFIGS """""""""" - -" Ctrlp -let g:ctrlp_map = '' -let g:ctrlp_cmd = 'CtrlP' - -" MULTI CURSOR -let g:multi_cursor_use_default_mapping=0 -" Default mapping -let g:multi_cursor_start_word_key = '' -let g:multi_cursor_select_all_word_key = '' -let g:multi_cursor_start_key = 'g' -let g:multi_cursor_select_all_key = 'g' -let g:multi_cursor_next_key = '' -let g:multi_cursor_prev_key = '' -let g:multi_cursor_skip_key = '' -let g:multi_cursor_quit_key = '' - -" ALE -" Note pylint sucks -" Note for javascript you need to: -" npm install eslint --save-dev -" ./node_modules/.bin/eslint --init -" or for global -" npm install -g eslint -" eslint --init -let g:ale_linters = { - \ 'cpp' : ['gcc'], - \ 'c' : ['gcc'], - \ 'vim' : ['vint'], - \ 'python': ['flake8', 'pyre', 'vulture', 'prospector', 'pyflakes', 'mypy', 'pyls'], - \ 'javascript': ['eslint'] - \} - -"let g:LanguageClient_serverCommands = { -" \ 'javascript': ['flow-language-server', '--stdio'], -" \ } - -let g:ale_cpp_gcc_options='-Wall -Wextra' -let g:ale_c_gcc_options='-Wall -Wextra' -let g:ale_vim_vint_executable = 'vint' -let g:ale_vim_vint_show_style_issues = 1 -map a :ALEToggle - -" Python TODO change this to point to virtual env with nevim support -if !empty(glob("/usr/lib/rpm/redhat")) - " For RHEL - "let g:chromatica#libclang_path='/usr/lib64/llvm' - let g:python3_host_prog = 'home/$USER/.conda/envs/py37/bin/python3.6' - "let g:chromatica#enable_at_startup=1 - "let g:chromatica#responsive_mode=1 -else - " For Debian based - let g:chromatica#libclang_path='/usr/lib/llvm-6.0/lib' - let g:python3_host_prog = '/usr/bin/python3.6' - let g:chromatica#enable_at_startup=1 - let g:chromatica#responsive_mode=1 -endif -" Chromatica -" FZF -if !empty((glob("~/.fzf"))) - set rtp+=~/.fzf -endif -""""""""""" FUNCTION KEYS """""""""""""" -"TODO figure out cscope -"TODO figure out virtualenv for neovim -"TODO Split vim into ftp stuff rtp - - +" Activate Modules +source $HOME/.config/nvim/modules/plugins.vim +source $HOME/.config/nvim/modules/general.vim +source $HOME/.config/nvim/modules/theme.vim diff --git a/installer.sh b/installer.sh deleted file mode 100644 index de8c093e..00000000 --- a/installer.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh -# Standalone installer for Unixs -# Original version is created by shoma2da -# https://github.com/shoma2da/neobundle_installer - -if [ $# -ne 1 ]; then - echo "You must specify the installation directory!" - exit 1 -fi - -# Convert the installation directory to absolute path -case $1 in - /*) PLUGIN_DIR=$1;; - *) PLUGIN_DIR=$PWD/$1;; -esac -INSTALL_DIR="${PLUGIN_DIR}/repos/github.com/Shougo/dein.vim" -echo "Install to \"$INSTALL_DIR\"..." -if [ -e "$INSTALL_DIR" ]; then - echo "\"$INSTALL_DIR\" already exists!" -fi - -echo "" - -# check git command -type git || { - echo 'Please install git or update your path to include the git executable!' - exit 1 -} -echo "" - -# make plugin dir and fetch dein -if ! [ -e "$INSTALL_DIR" ]; then - echo "Begin fetching dein..." - mkdir -p "$PLUGIN_DIR" - git clone https://github.com/Shougo/dein.vim "$INSTALL_DIR" - echo "Done." - echo "" -fi - -# write initial setting for .vimrc -echo "Please add the following settings for dein to the top of your vimrc (Vim) or init.vim (NeoVim) file:" -{ - echo "" - echo "" - echo "\"dein Scripts-----------------------------" - echo "if &compatible" - echo " set nocompatible \" Be iMproved" - echo "endif" - echo "" - echo "\" Required:" - echo "set runtimepath+=$INSTALL_DIR" - echo "" - echo "\" Required:" - echo "if dein#load_state('$PLUGIN_DIR')" - echo " call dein#begin('$PLUGIN_DIR')" - echo "" - echo " \" Let dein manage dein" - echo " \" Required:" - echo " call dein#add('$INSTALL_DIR')" - echo "" - echo " \" Add or remove your plugins here like this:" - echo " \"call dein#add('Shougo/neosnippet.vim')" - echo " \"call dein#add('Shougo/neosnippet-snippets')" - echo "" - echo " \" Required:" - echo " call dein#end()" - echo " call dein#save_state()" - echo "endif" - echo "" - echo "\" Required:" - echo "filetype plugin indent on" - echo "syntax enable" - echo "" - echo "\" If you want to install not installed plugins on startup." - echo "\"if dein#check_install()" - echo "\" call dein#install()" - echo "\"endif" - echo "" - echo "\"End dein Scripts-------------------------" - echo "" - echo "" -} - -echo "Done." - -echo "Complete setup dein!" diff --git a/modules/general.vim b/modules/general.vim new file mode 100644 index 00000000..23f7a85b --- /dev/null +++ b/modules/general.vim @@ -0,0 +1,11 @@ +" Be IMproved +if &compatible + set nocompatible +endif + +" Gives vim abilty to recognize filetypes +filetype plugin indent on +" Enables syntax highlighing +syntax enable + +let g:python3_host_prog = '~/Miniconda/envs/neovim/bin/python3.7' diff --git a/modules/plugins.vim b/modules/plugins.vim new file mode 100644 index 00000000..3f55a38c --- /dev/null +++ b/modules/plugins.vim @@ -0,0 +1,33 @@ +" Add the dein installation directory into runtimepath +set runtimepath+=~/.config/nvim/dein/repos/github.com/Shougo/dein.vim + +if dein#load_state('~/.config/nvim/dein') + call dein#begin('~/.config/nvim/dein') + + " Themes + call dein#add('liuchengxu/space-vim-dark') + call dein#add('joshdick/onedark.vim') + call dein#add('morhetz/gruvbox') + call dein#add('jacoborus/tender.vim') + " Better Syntax Support + call dein#add('sheerun/vim-polyglot') + " powerline + call dein#add('vim-airline/vim-airline') + call dein#add('vim-airline/vim-airline-themes') + + call dein#add('~/.config/nvim/dein/repos/github.com/Shougo/dein.vim') + call dein#add('Shougo/deoplete.nvim') + if !has('nvim') + call dein#add('roxma/nvim-yarp') + call dein#add('roxma/vim-hug-neovim-rpc') + endif + + call dein#end() + call dein#save_state() +endif + + +" If you want to install not installed plugins on startup. +if dein#check_install() + call dein#install() +endif diff --git a/modules/theme.vim b/modules/theme.vim new file mode 100644 index 00000000..1679b2e4 --- /dev/null +++ b/modules/theme.vim @@ -0,0 +1,21 @@ + +" Switch to whatever colorscheme you like +"colorscheme onedark +"colorscheme gruvbox +colorscheme tender + +" This chunk is just for spacevim theme +"colorscheme space-vim-dark +"let g:space_vim_dark_background = 235 +"color space-vim-dark + +" gray comments +hi Comment guifg=#5C6370 ctermfg=59 +" this will show italics if your terminal supports that +hi Comment cterm=italic + +" checks if your terminal has 24-bit color support +if (has("termguicolors")) + set termguicolors + hi LineNr ctermbg=NONE guibg=NONE +endif diff --git a/old/README.md b/old/README.md new file mode 100644 index 00000000..b4e8a53f --- /dev/null +++ b/old/README.md @@ -0,0 +1,2 @@ +# nvim +Neovim config diff --git a/old/init.vim b/old/init.vim new file mode 100644 index 00000000..946a7b0a --- /dev/null +++ b/old/init.vim @@ -0,0 +1,356 @@ + +"""""""""" HOUSEKEEPING """""""""" +syntax on +set nowrap +set encoding=utf8 +set mouse=a +set splitbelow +set splitright +set t_Co=256 +set autochdir +" saving +nnoremap :w +nnoremap :wq! +" escape can blow me +nnoremap +" Set Proper Tabs +set tabstop=4 +set shiftwidth=4 +set smarttab +set expandtab +" Always display the status line +set laststatus=2 +" Gets rid of highlights after search +"nnoremap :nohlsearch +" Line numbers +set number +" Toggle line numbers +nnoremap :10split term://bash +nnoremap :BuffergatorToggle +nnoremap :Files +nnoremap :SearchTasks * +nnoremap :NERDTreeToggle +nnoremap :set nonumber! +nnoremap :nohlsearch +nnoremap :TagbarToggle +nnoremap :vsplit +nnoremap :split +nnoremap :only + +" insert mode for terminal +autocmd BufWinEnter,WinEnter term://* startinsert +autocmd BufLeave term://* stopinsert + +" Be iMproved +if &compatible + set nocompatible +endif + +" Remap window switch +nnoremap h +nnoremap j +nnoremap k +nnoremap l +" Remap terminal switch +tnoremap +tnoremap +tnoremap h +tnoremap j +tnoremap k +tnoremap l +" : completion. +inoremap pumvisible() ? "\" : "\" +" Enable Elite mode, No ARRRROWWS!!!! +let g:elite_mode=1 +" Disable arrow movement, resize splits instead. +if get(g:, 'elite_mode') + nnoremap :resize -2 + nnoremap :resize +2 + nnoremap :vertical resize -2 + nnoremap :vertical resize +2 +endif +nnoremap :bnext +nnoremap :bprevious +let mapleader = "," +"""""""""" END HOUSEKEEPING """""""""" + +"""""""""" PLUGINS """""""""" +" Required: +set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim + +" Required: +if dein#load_state('~/chris/.cache/dein') + call dein#begin('~/.cache/dein') + + " Let dein manage dein + " Required: + call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim') + + " Start Screen + call dein#add('mhinz/vim-startify') + " Search Index shows how many instances of searched term + call dein#add('google/vim-searchindex') + " line indents + "call dein#add('Yggdroot/indentLine') + " Gutentags + call dein#add('ludovicchabant/vim-gutentags') + "call dein#add('steffanc/cscopemaps.vim') + "call dein#add('brookhong/cscope.vim') + "call dein#add('vim-scripts/autoload_cscope.vim') + " Tagbar + call dein#add('majutsushi/tagbar') + " Add or remove your plugins here: TODO + call dein#add('Shougo/neosnippet.vim') + call dein#add('Shougo/neosnippet-snippets') + " Themes + call dein#add('liuchengxu/space-vim-dark') + call dein#add('nightsense/stellarized') + call dein#add('vim-airline/vim-airline') + "call dein#add('itchyny/lightline.vim') + call dein#add('vim-airline/vim-airline-themes') + call dein#add('chriskempson/base16-vim') + " Auto Pairs + call dein#add('jiangmiao/auto-pairs') + " Buffergator use \b + call dein#add('jeetsukumaran/vim-buffergator') + " Ctrlp + call dein#add('ctrlpvim/ctrlp.vim') + " Searchtasks searches for TODO, FIXME, XXX and such run :SearchTasks . + call dein#add('gilsondev/searchtasks.vim') + "Syntax + call dein#add('w0rp/ale') + call dein#add('arakashic/chromatica.nvim') + "Git + call dein#add('airblade/vim-gitgutter') + call dein#add('tpope/vim-fugitive') + " Multiple Cursors + call dein#add('terryma/vim-multiple-cursors') + " NERDTree + call dein#add('scrooloose/nerdtree') + call dein#add('scrooloose/nerdcommenter') + " FZF + call dein#add('junegunn/fzf.vim', { 'dir': '~/.fzf', 'do': './install --all' }) + "call dein#add('junegunn/fzf') + " BufOnly use :BufOnly to unload all or pass it a single buffer + call dein#add('vim-scripts/BufOnly.vim') + " For autocomplete + call dein#add('zchee/deoplete-jedi') + call dein#add('Shougo/deoplete.nvim') + " For Web Development + call dein#add('pangloss/vim-javascript') + call dein#add('elzr/vim-json') + call dein#add('mxw/vim-jsx') + call dein#add('mattn/emmet-vim') + call dein#add('prettier/vim-prettier', {'do': 'yarn install'}) + " Auto flow + call dein#add('wokalski/autocomplete-flow') + " For vim 8+ + if !has('nvim') + call dein#add('roxma/nvim-yarp') + call dein#add('roxma/vim-hug-neovim-rpc') + endif + + " You can specify revision/branch/tag. + call dein#add('Shougo/deol.nvim', { 'rev': '01203d4c9' }) + + " Required: + call dein#end() + call dein#save_state() +endif + +" Required: +filetype plugin indent on +syntax enable + +" If you want to install not installed plugins on startup. +if dein#check_install() + call dein#install() +endif + +"""""""""" END PLUGINS """""""""" + +"""""""""" SPACEVIM THEME """""""""" + +" Set theme TODO kill this light theme +if strftime('%H') >= 7 && strftime('%H') < 7 + set background=light + colorscheme stellarized +else + set background=dark + colorscheme space-vim-dark + + " Range: 233 (darkest) ~ 238 (lightest) + " Default: 235 + let g:space_vim_dark_background = 233 + color space-vim-dark + hi Comment guifg=#5C6370 ctermfg=59 + let base16colorspace=256 " Access colors present in 256 colorspace + if !empty(glob("/usr/lib/rpm/redhat")) + "Lightline + if !exists('g:airline_symbols') + let g:airline_symbols = {} + endif + + " unicode symbols + let g:airline_left_sep = '»' + let g:airline_left_sep = '▶' + let g:airline_right_sep = '«' + let g:airline_right_sep = '◀' + let g:airline_symbols.crypt = '🔒' + let g:airline_symbols.linenr = '☰' + let g:airline_symbols.linenr = '␊' + let g:airline_symbols.linenr = '␤' + let g:airline_symbols.linenr = '¶' + let g:airline_symbols.maxlinenr = '' + let g:airline_symbols.maxlinenr = '㏑' + let g:airline_symbols.branch = '⎇' + let g:airline_symbols.paste = 'ρ' + let g:airline_symbols.paste = 'Þ' + let g:airline_symbols.paste = '∥' + let g:airline_symbols.spell = 'Ꞩ' + let g:airline_symbols.notexists = 'Ɇ' + let g:airline_symbols.whitespace = 'Ξ' + + " powerline symbols + let g:airline_left_sep = '' + let g:airline_left_alt_sep = '' + let g:airline_right_sep = '' + let g:airline_right_alt_sep = '' + let g:airline_symbols.branch = '' + let g:airline_symbols.readonly = '' + let g:airline_symbols.linenr = '☰' + let g:airline_symbols.maxlinenr = '' + + " old vim-powerline symbols + let g:airline_left_sep = '⮀' + let g:airline_left_alt_sep = '⮁' + let g:airline_right_sep = '⮂' + let g:airline_right_alt_sep = '⮃' + let g:airline_symbols.branch = '⭠' + let g:airline_symbols.readonly = '⭤' + let g:airline_symbols.linenr = '⭡' + + "let g:loaded_airline = 1 + "set showtabline=2 + "set noshowmode + "let g:lightline = { + " \ 'colorscheme': 'jellybeans', + " \ 'active': { + " \ 'left': [['mode', 'paste'], + " \ ['gitbranch', 'readonly', 'filename', 'modified'] ] + " \ }, + " \ 'component_function': { + " \ 'gitbranch': 'fugitive#head' + " \ }, + " \ } + else + + "Airline + set noshowmode + let g:airline_theme='violet' + let g:airline#extensions#tabline#enabled = 1 + let g:airline_powerline_fonts = 1 + let g:hybrid_custom_term_colors = 1 + if !exists('g:airline_symbols') + let g:airline_symbols = {} + let g:airline_symbols.space = "\ua0" + endif + endif +endif +" Enable highlighting of the current line +set cursorline +"""""""""" END THEME """""""""" + +"""""""""" BEGIN CONFIGS """""""""" + +" Deoplete +let g:deoplete#enable_at_startup = 1 +" NeoSnippet +let g:neosnippet#enable_completed_snippet = 1 +imap (neosnippet_expand_or_jump) +smap (neosnippet_expand_or_jump) +xmap (neosnippet_expand_target) +" Startify +let g:startify_custom_header = [ + \ ' _ __ _ ', + \ ' / | / /__ ____ _ __(_)___ ___ ', + \ ' / |/ / _ \/ __ \ | / / / __ `__ \', + \ ' / /| / __/ /_/ / |/ / / / / / / /', + \ ' /_/ |_/\___/\____/|___/_/_/ /_/ /_/ '] + +" Tagbar +"nmap :TagbarToggle +" NERDTree +"nmap :NERDTreeToggle +let NERDTreeShowHidden = 1 +" SearchTasks +"nmap :SearchTasks * +"""""""""" END CONFIGS """""""""" + +" Ctrlp +let g:ctrlp_map = '' +let g:ctrlp_cmd = 'CtrlP' + +" MULTI CURSOR +let g:multi_cursor_use_default_mapping=0 +" Default mapping +let g:multi_cursor_start_word_key = '' +let g:multi_cursor_select_all_word_key = '' +let g:multi_cursor_start_key = 'g' +let g:multi_cursor_select_all_key = 'g' +let g:multi_cursor_next_key = '' +let g:multi_cursor_prev_key = '' +let g:multi_cursor_skip_key = '' +let g:multi_cursor_quit_key = '' + +" ALE +" Note pylint sucks +" Note for javascript you need to: +" npm install eslint --save-dev +" ./node_modules/.bin/eslint --init +" or for global +" npm install -g eslint +" eslint --init +let g:ale_linters = { + \ 'cpp' : ['gcc'], + \ 'c' : ['gcc'], + \ 'vim' : ['vint'], + \ 'python': ['flake8', 'pyre', 'vulture', 'prospector', 'pyflakes', 'mypy', 'pyls'], + \ 'javascript': ['eslint'] + \} + +"let g:LanguageClient_serverCommands = { +" \ 'javascript': ['flow-language-server', '--stdio'], +" \ } + +let g:ale_cpp_gcc_options='-Wall -Wextra' +let g:ale_c_gcc_options='-Wall -Wextra' +let g:ale_vim_vint_executable = 'vint' +let g:ale_vim_vint_show_style_issues = 1 +map a :ALEToggle + +" Python TODO change this to point to virtual env with nevim support +if !empty(glob("/usr/lib/rpm/redhat")) + " For RHEL + "let g:chromatica#libclang_path='/usr/lib64/llvm' + let g:python3_host_prog = 'home/$USER/.conda/envs/py37/bin/python3.6' + "let g:chromatica#enable_at_startup=1 + "let g:chromatica#responsive_mode=1 +else + " For Debian based + let g:chromatica#libclang_path='/usr/lib/llvm-6.0/lib' + let g:python3_host_prog = '/usr/bin/python3.6' + let g:chromatica#enable_at_startup=1 + let g:chromatica#responsive_mode=1 +endif +" Chromatica +" FZF +if !empty((glob("~/.fzf"))) + set rtp+=~/.fzf +endif +""""""""""" FUNCTION KEYS """""""""""""" +"TODO figure out cscope +"TODO figure out virtualenv for neovim +"TODO Split vim into ftp stuff rtp + + diff --git a/old/installer.sh b/old/installer.sh new file mode 100644 index 00000000..de8c093e --- /dev/null +++ b/old/installer.sh @@ -0,0 +1,86 @@ +#!/bin/sh +# Standalone installer for Unixs +# Original version is created by shoma2da +# https://github.com/shoma2da/neobundle_installer + +if [ $# -ne 1 ]; then + echo "You must specify the installation directory!" + exit 1 +fi + +# Convert the installation directory to absolute path +case $1 in + /*) PLUGIN_DIR=$1;; + *) PLUGIN_DIR=$PWD/$1;; +esac +INSTALL_DIR="${PLUGIN_DIR}/repos/github.com/Shougo/dein.vim" +echo "Install to \"$INSTALL_DIR\"..." +if [ -e "$INSTALL_DIR" ]; then + echo "\"$INSTALL_DIR\" already exists!" +fi + +echo "" + +# check git command +type git || { + echo 'Please install git or update your path to include the git executable!' + exit 1 +} +echo "" + +# make plugin dir and fetch dein +if ! [ -e "$INSTALL_DIR" ]; then + echo "Begin fetching dein..." + mkdir -p "$PLUGIN_DIR" + git clone https://github.com/Shougo/dein.vim "$INSTALL_DIR" + echo "Done." + echo "" +fi + +# write initial setting for .vimrc +echo "Please add the following settings for dein to the top of your vimrc (Vim) or init.vim (NeoVim) file:" +{ + echo "" + echo "" + echo "\"dein Scripts-----------------------------" + echo "if &compatible" + echo " set nocompatible \" Be iMproved" + echo "endif" + echo "" + echo "\" Required:" + echo "set runtimepath+=$INSTALL_DIR" + echo "" + echo "\" Required:" + echo "if dein#load_state('$PLUGIN_DIR')" + echo " call dein#begin('$PLUGIN_DIR')" + echo "" + echo " \" Let dein manage dein" + echo " \" Required:" + echo " call dein#add('$INSTALL_DIR')" + echo "" + echo " \" Add or remove your plugins here like this:" + echo " \"call dein#add('Shougo/neosnippet.vim')" + echo " \"call dein#add('Shougo/neosnippet-snippets')" + echo "" + echo " \" Required:" + echo " call dein#end()" + echo " call dein#save_state()" + echo "endif" + echo "" + echo "\" Required:" + echo "filetype plugin indent on" + echo "syntax enable" + echo "" + echo "\" If you want to install not installed plugins on startup." + echo "\"if dein#check_install()" + echo "\" call dein#install()" + echo "\"endif" + echo "" + echo "\"End dein Scripts-------------------------" + echo "" + echo "" +} + +echo "Done." + +echo "Complete setup dein!" diff --git a/old/setupDEB.sh b/old/setupDEB.sh new file mode 100755 index 00000000..11680cba --- /dev/null +++ b/old/setupDEB.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# installing neovim +sudo apt install -y neovim + +# needed to pull installer +sudo apt install -y curl + +# used for clipboard +sudo apt install -y xsel + +# pesky fonts +sudo apt install -y powerline-fonts + +# pul sown installer +curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh + +# run installer +sh ./installer.sh ~/.cache/dein + +git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf + +~/.fzf/install diff --git a/old/setupRHEL.sh b/old/setupRHEL.sh new file mode 100755 index 00000000..43563290 --- /dev/null +++ b/old/setupRHEL.sh @@ -0,0 +1,2 @@ + +sudo yum install -y neovim diff --git a/setupDEB.sh b/setupDEB.sh deleted file mode 100755 index 11680cba..00000000 --- a/setupDEB.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# installing neovim -sudo apt install -y neovim - -# needed to pull installer -sudo apt install -y curl - -# used for clipboard -sudo apt install -y xsel - -# pesky fonts -sudo apt install -y powerline-fonts - -# pul sown installer -curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh - -# run installer -sh ./installer.sh ~/.cache/dein - -git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf - -~/.fzf/install diff --git a/setupRHEL.sh b/setupRHEL.sh deleted file mode 100755 index 43563290..00000000 --- a/setupRHEL.sh +++ /dev/null @@ -1,2 +0,0 @@ - -sudo yum install -y neovim diff --git a/tags b/tags deleted file mode 100644 index 70ac5998..00000000 --- a/tags +++ /dev/null @@ -1,105 +0,0 @@ -!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ -!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ -!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ -!_TAG_PROGRAM_AUTHOR Universal Ctags Team // -!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ -!_TAG_PROGRAM_URL https://ctags.io/ /official site/ -!_TAG_PROGRAM_VERSION 0.0.0 /f76ed534/ - init.vim /^nnoremap :wq!$/;" m - init.vim /^nnoremap $/;" m - init.vim /^nnoremap h$/;" m - init.vim /^nnoremap j$/;" m - init.vim /^imap (neosnippet_expand_or_jump)$/;" m - init.vim /^nnoremap k$/;" m - init.vim /^smap (neosnippet_expand_or_jump)$/;" m - init.vim /^xmap (neosnippet_expand_target)$/;" m - init.vim /^nnoremap l$/;" m - init.vim /^nnoremap :w$/;" m - init.vim /^ nnoremap :resize +2$/;" m - init.vim /^nnoremap :split$/;" m - init.vim /^nnoremap :only$/;" m - init.vim /^nnoremap :10split term:\/\/bash $/;" m - init.vim /^nnoremap :BuffergatorToggle$/;" m - init.vim /^nnoremap :Files$/;" m - init.vim /^nnoremap :SearchTasks *$/;" m - init.vim /^nnoremap :NERDTreeToggle$/;" m - init.vim /^nnoremap :set nonumber!$/;" m - init.vim /^nnoremap :nohlsearch$/;" m - init.vim /^nnoremap :TagbarToggle$/;" m - init.vim /^nnoremap :vsplit$/;" m - init.vim /^ nnoremap :vertical resize -2$/;" m - init.vim /^ nnoremap :vertical resize +2$/;" m - init.vim /^nnoremap :bprevious$/;" m - init.vim /^inoremap pumvisible() ? "\\" : "\\"$/;" m - init.vim /^nnoremap :bnext$/;" m - init.vim /^ nnoremap :resize -2$/;" m -a init.vim /^map a :ALEToggle$/;" m -NERDTreeShowHidden init.vim /^let NERDTreeShowHidden = 1$/;" v -base16colorspace init.vim /^ let base16colorspace=256 " Access colors present in 256 colorspace$/;" v -g:airline#extensions#tabline#enabled init.vim /^ let g:airline#extensions#tabline#enabled = 1$/;" v -g:airline_left_alt_sep init.vim /^ let g:airline_left_alt_sep = '⮁'$/;" v -g:airline_left_alt_sep init.vim /^ let g:airline_left_alt_sep = ''$/;" v -g:airline_left_sep init.vim /^ let g:airline_left_sep = '»'$/;" v -g:airline_left_sep init.vim /^ let g:airline_left_sep = '▶'$/;" v -g:airline_left_sep init.vim /^ let g:airline_left_sep = '⮀'$/;" v -g:airline_left_sep init.vim /^ let g:airline_left_sep = ''$/;" v -g:airline_powerline_fonts init.vim /^ let g:airline_powerline_fonts = 1 $/;" v -g:airline_right_alt_sep init.vim /^ let g:airline_right_alt_sep = '⮃'$/;" v -g:airline_right_alt_sep init.vim /^ let g:airline_right_alt_sep = ''$/;" v -g:airline_right_sep init.vim /^ let g:airline_right_sep = '«'$/;" v -g:airline_right_sep init.vim /^ let g:airline_right_sep = '◀'$/;" v -g:airline_right_sep init.vim /^ let g:airline_right_sep = '⮂'$/;" v -g:airline_right_sep init.vim /^ let g:airline_right_sep = ''$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols = {}$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.space = "\\ua0"$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols = {}$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.branch = '⎇'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.branch = '⭠'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.branch = ''$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.crypt = '🔒'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.linenr = '¶'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.linenr = '␊'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.linenr = '␤'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.linenr = '☰'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.linenr = '⭡'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.maxlinenr = ''$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.maxlinenr = '㏑'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.maxlinenr = ''$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.notexists = 'Ɇ'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.paste = 'Þ'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.paste = 'ρ'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.paste = '∥'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.readonly = '⭤'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.readonly = ''$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.spell = 'Ꞩ'$/;" v -g:airline_symbols init.vim /^ let g:airline_symbols.whitespace = 'Ξ'$/;" v -g:airline_theme init.vim /^ let g:airline_theme='violet'$/;" v -g:ale_c_gcc_options init.vim /^let g:ale_c_gcc_options='-Wall -Wextra'$/;" v -g:ale_cpp_gcc_options init.vim /^let g:ale_cpp_gcc_options='-Wall -Wextra'$/;" v -g:ale_linters init.vim /^let g:ale_linters = {$/;" v -g:ale_vim_vint_executable init.vim /^let g:ale_vim_vint_executable = 'vint'$/;" v -g:ale_vim_vint_show_style_issues init.vim /^let g:ale_vim_vint_show_style_issues = 1$/;" v -g:chromatica#enable_at_startup init.vim /^ let g:chromatica#enable_at_startup=1$/;" v -g:chromatica#libclang_path init.vim /^ let g:chromatica#libclang_path='\/usr\/lib\/llvm-6.0\/lib'$/;" v -g:chromatica#responsive_mode init.vim /^ let g:chromatica#responsive_mode=1$/;" v -g:ctrlp_cmd init.vim /^let g:ctrlp_cmd = 'CtrlP'$/;" v -g:ctrlp_map init.vim /^let g:ctrlp_map = ''$/;" v -g:deoplete#enable_at_startup init.vim /^let g:deoplete#enable_at_startup = 1$/;" v -g:elite_mode init.vim /^let g:elite_mode=1$/;" v -g:hybrid_custom_term_colors init.vim /^ let g:hybrid_custom_term_colors = 1$/;" v -g:multi_cursor_next_key init.vim /^let g:multi_cursor_next_key = ''$/;" v -g:multi_cursor_prev_key init.vim /^let g:multi_cursor_prev_key = ''$/;" v -g:multi_cursor_quit_key init.vim /^let g:multi_cursor_quit_key = ''$/;" v -g:multi_cursor_select_all_key init.vim /^let g:multi_cursor_select_all_key = 'g'$/;" v -g:multi_cursor_select_all_word_key init.vim /^let g:multi_cursor_select_all_word_key = ''$/;" v -g:multi_cursor_skip_key init.vim /^let g:multi_cursor_skip_key = ''$/;" v -g:multi_cursor_start_key init.vim /^let g:multi_cursor_start_key = 'g'$/;" v -g:multi_cursor_start_word_key init.vim /^let g:multi_cursor_start_word_key = ''$/;" v -g:multi_cursor_use_default_mapping init.vim /^let g:multi_cursor_use_default_mapping=0$/;" v -g:neosnippet#enable_completed_snippet init.vim /^let g:neosnippet#enable_completed_snippet = 1$/;" v -g:python3_host_prog init.vim /^ let g:python3_host_prog = '\/usr\/bin\/python3.6'$/;" v -g:python3_host_prog init.vim /^ let g:python3_host_prog = 'home\/$USER\/.conda\/envs\/py37\/bin\/python3.6'$/;" v -g:space_vim_dark_background init.vim /^ let g:space_vim_dark_background = 233$/;" v -g:startify_custom_header init.vim /^let g:startify_custom_header = [ /;" v -mapleader init.vim /^let mapleader = ","$/;" v -nvim README.md /^# nvim$/;" c diff --git a/utils/installer.sh b/utils/installer.sh new file mode 100644 index 00000000..de8c093e --- /dev/null +++ b/utils/installer.sh @@ -0,0 +1,86 @@ +#!/bin/sh +# Standalone installer for Unixs +# Original version is created by shoma2da +# https://github.com/shoma2da/neobundle_installer + +if [ $# -ne 1 ]; then + echo "You must specify the installation directory!" + exit 1 +fi + +# Convert the installation directory to absolute path +case $1 in + /*) PLUGIN_DIR=$1;; + *) PLUGIN_DIR=$PWD/$1;; +esac +INSTALL_DIR="${PLUGIN_DIR}/repos/github.com/Shougo/dein.vim" +echo "Install to \"$INSTALL_DIR\"..." +if [ -e "$INSTALL_DIR" ]; then + echo "\"$INSTALL_DIR\" already exists!" +fi + +echo "" + +# check git command +type git || { + echo 'Please install git or update your path to include the git executable!' + exit 1 +} +echo "" + +# make plugin dir and fetch dein +if ! [ -e "$INSTALL_DIR" ]; then + echo "Begin fetching dein..." + mkdir -p "$PLUGIN_DIR" + git clone https://github.com/Shougo/dein.vim "$INSTALL_DIR" + echo "Done." + echo "" +fi + +# write initial setting for .vimrc +echo "Please add the following settings for dein to the top of your vimrc (Vim) or init.vim (NeoVim) file:" +{ + echo "" + echo "" + echo "\"dein Scripts-----------------------------" + echo "if &compatible" + echo " set nocompatible \" Be iMproved" + echo "endif" + echo "" + echo "\" Required:" + echo "set runtimepath+=$INSTALL_DIR" + echo "" + echo "\" Required:" + echo "if dein#load_state('$PLUGIN_DIR')" + echo " call dein#begin('$PLUGIN_DIR')" + echo "" + echo " \" Let dein manage dein" + echo " \" Required:" + echo " call dein#add('$INSTALL_DIR')" + echo "" + echo " \" Add or remove your plugins here like this:" + echo " \"call dein#add('Shougo/neosnippet.vim')" + echo " \"call dein#add('Shougo/neosnippet-snippets')" + echo "" + echo " \" Required:" + echo " call dein#end()" + echo " call dein#save_state()" + echo "endif" + echo "" + echo "\" Required:" + echo "filetype plugin indent on" + echo "syntax enable" + echo "" + echo "\" If you want to install not installed plugins on startup." + echo "\"if dein#check_install()" + echo "\" call dein#install()" + echo "\"endif" + echo "" + echo "\"End dein Scripts-------------------------" + echo "" + echo "" +} + +echo "Done." + +echo "Complete setup dein!" -- cgit v1.2.3