From 1c1e7095ca4c955536ebe1bfff94f9ba943188d1 Mon Sep 17 00:00:00 2001 From: Carolyn Saunders Date: Tue, 13 Feb 2018 21:58:10 -0800 Subject: [PATCH] Added .kshrc --- .config/nvim/init.vim | 48 +++--- .kshrc | 15 ++ init.vim | 348 ------------------------------------------ 3 files changed, 41 insertions(+), 370 deletions(-) create mode 100644 .kshrc delete mode 100644 init.vim diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index a98ab4c..52f4b33 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -3,7 +3,6 @@ Plug 'ElmCast/elm-vim', {'for' : 'elm'} Plug 'HerringtonDarkholme/yats', {'for' : 'typescript'} Plug 'Quramy/tsuquyomi', {'for' : 'typescript'} Plug 'Quramy/vim-js-pretty-template', {'for' : 'javascript'} -Plug 'Shougo/denite.nvim' Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'Shougo/neosnippet' Plug 'Shougo/neosnippet-snippets' @@ -31,7 +30,6 @@ Plug 'kassio/neoterm' Plug 'majutsushi/tagbar', {'on' : 'Tagbar'} Plug 'mhartington/deoplete-typescript', {'for' : 'typescript'} Plug 'mhinz/vim-startify' -Plug 'mileszs/ack.vim' Plug 'mkasa/lushtags', {'for' : 'haskell'} Plug 'nathanaelkane/vim-indent-guides' Plug 'neomake/neomake' @@ -47,16 +45,20 @@ Plug 'reedes/vim-litecorrect' Plug 'reedes/vim-pencil', {'for' : 'markdown'} Plug 'rust-lang/rust.vim', {'for' : 'rust'} Plug 'scrooloose/nerdcommenter' -Plug 'scrooloose/nerdtree', {'on' : 'NERDTreeToggle'} Plug 'sebastianmarkow/deoplete-rust', {'for' : 'rust'} Plug 'sgur/vim-lazygutter' Plug 'slashmili/alchemist.vim', {'for' : 'elixir'} Plug 'tpope/vim-fugitive' Plug 'tpope/vim-surround' -Plug 'tyrannicaltoucan/vim-quantum' -Plug 'xolox/vim-easytags' Plug 'xolox/vim-misc' Plug 'xolox/vim-notes' +Plug 'junegunn/goyo.vim' +Plug 'lervag/vimtex', {'for' : 'tex'} +Plug 'tpope/vim-vinegar' +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +Plug 'junegunn/fzf.vim' +Plug 'l04m33/vlime', {'rtp': 'vim/', 'for' : 'lisp'} +Plug 'hecal3/vim-leader-guide' call plug#end() set exrc @@ -67,9 +69,6 @@ let test#strategy = "neoterm" let g:elm_format_autosave = 1 "set tags=tags;/ set tags=./tags,tags;$HOME -let g:easytags_dynamic_files = 1 -let g:easytags_async = 1 -let g:easytags_events = ['BufWritePost'] set ttyfast set number set relativenumber @@ -80,7 +79,10 @@ set path+=** set wildmenu set ignorecase set smartcase +set spelllang=en imap fj +colorscheme shblah + filetype plugin on let g:deoplete#enable_at_startup = 1 if !exists('g:deoplete#omni#input_patterns') @@ -100,12 +102,8 @@ let g:bufferline_echo = 0 autocmd FileType typescript nmap i : echo tsuquyomi#hint() autocmd FileType elm nmap i :ElmShowDocs -let g:quantum_black = 1 -colorscheme quantum -if has("termguicolors") - set termguicolors -endif +set runtimepath+=$HOME/.config/nvim/localplug let g:vim_markdown_folding_disabled = 1 @@ -149,10 +147,6 @@ function! neomake#makers#ft#elixir#EnabledMakers() return ['credo'] endfunction -let g:ackprg = 'ag --nogroup --nocolor --column' - -call denite#custom#var('file_rec', 'command', - \ ['ag', '--follow', '--nocolor', '--nogroup', '-g', '']) "snippets let g:neosnippet#enable_snipmate_compatibility = 1 @@ -171,26 +165,36 @@ set smarttab set smartcase :imap fd + +command! -bang -nargs=* Rg + \ call fzf#vim#grep( + \ 'rg --column --line-number --hidden --no-heading --color=always --ignore-case -g "!{.git*,node_modules,Wallpapers,,icons,.themes,.fonts,*quicklisp*}" '.shellescape(), 1, + \ 0 ? fzf#vim#with_preview('up:60%') + \ : fzf#vim#with_preview('right:50%:hidden', '?'), + \ 0) + "Leader keys let mapleader="\" "neoterm -noremap p :Denite file_rec buffer noremap w :w noremap W :w !sudo tee % > /dev/null noremap q :q noremap r :%s/ -noremap f :Ack -noremap n :NERDTreeToggle +noremap f :Rg noremap t :Tagbar nmap ev :e $MYVIMRC nmap sv :so $MYVIMRC +nnoremap bb :Buffers nnoremap bd :bd nnoremap bn :bnext! nnoremap bp :bprevious! vnoremap < >gv -nnoremap v :vsplit -" " Remap split movement +nnoremap v : vsplit +nnoremap p : Files . +nnoremap gp : GFiles +nnoremap ls : setlocal spell +"" Remap split movement nmap j j nmap k k nmap h h diff --git a/.kshrc b/.kshrc new file mode 100644 index 0000000..ec9ad58 --- /dev/null +++ b/.kshrc @@ -0,0 +1,15 @@ +alias vim="nvim" +alias vi="vim" +export EDITOR="nvim" +set -o emacs + +export PATH="/usr/local/jdk-1.8.0/bin/":$PATH +export HISTFILE="$HOME/.ksh-history" + +export GPG_TTY="$(tty)" +export SSH_AUTH_SOCK="${HOME}/.gnupg/S.gpg-agent.ssh" + +export PS1="\033[95m▓▒░\033[00m " + + +ufetch diff --git a/init.vim b/init.vim deleted file mode 100644 index 52f4b33..0000000 --- a/init.vim +++ /dev/null @@ -1,348 +0,0 @@ -call plug#begin('~/.config/nvim/plugged') -Plug 'ElmCast/elm-vim', {'for' : 'elm'} -Plug 'HerringtonDarkholme/yats', {'for' : 'typescript'} -Plug 'Quramy/tsuquyomi', {'for' : 'typescript'} -Plug 'Quramy/vim-js-pretty-template', {'for' : 'javascript'} -Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } -Plug 'Shougo/neosnippet' -Plug 'Shougo/neosnippet-snippets' -Plug 'Shougo/vimproc.vim', {'do' : 'make'} -Plug 'Twinside/vim-hoogle', {'for' : 'haskell'} -Plug 'bitterjug/vim-tagbar-ctags-elm', {'for' : 'elm'} -Plug 'bling/vim-bufferline' -Plug 'cespare/vim-toml', {'for' : 'toml'} -Plug 'chrisbra/Colorizer' -Plug 'chrisbra/Colorizer' -Plug 'chrisbra/improvedft' -Plug 'easymotion/vim-easymotion' -Plug 'elixir-lang/vim-elixir', {'for' : 'elixir'} -Plug 'fmoralesc/vim-tutor-mode', {'on' : 'Tutor'} -Plug 'godlygeek/tabular' -Plug 'haya14busa/incsearch-easymotion.vim' -Plug 'haya14busa/incsearch-fuzzy.vim' -Plug 'haya14busa/incsearch.vim' -Plug 'itchyny/lightline.vim' -Plug 'janko-m/vim-test' -Plug 'jason0x43/vim-js-indent', {'for' : 'javascript'} -Plug 'jceb/vim-orgmode' -Plug 'jiangmiao/auto-pairs' -Plug 'kassio/neoterm' -Plug 'majutsushi/tagbar', {'on' : 'Tagbar'} -Plug 'mhartington/deoplete-typescript', {'for' : 'typescript'} -Plug 'mhinz/vim-startify' -Plug 'mkasa/lushtags', {'for' : 'haskell'} -Plug 'nathanaelkane/vim-indent-guides' -Plug 'neomake/neomake' -Plug 'neovimhaskell/haskell-vim', {'for' : 'haskell'} -Plug 'ntpeters/vim-better-whitespace' -Plug 'othree/yajs.vim' -Plug 'pangloss/vim-javascript', {'for' : 'javascript'} -Plug 'plasticboy/vim-markdown', {'for' : 'markdown'} -Plug 'powerman/vim-plugin-AnsiEsc' -Plug 'racer-rust/vim-racer', {'for' : 'rust'} -Plug 'reedes/vim-lexical', {'for' : 'markdown'} -Plug 'reedes/vim-litecorrect' -Plug 'reedes/vim-pencil', {'for' : 'markdown'} -Plug 'rust-lang/rust.vim', {'for' : 'rust'} -Plug 'scrooloose/nerdcommenter' -Plug 'sebastianmarkow/deoplete-rust', {'for' : 'rust'} -Plug 'sgur/vim-lazygutter' -Plug 'slashmili/alchemist.vim', {'for' : 'elixir'} -Plug 'tpope/vim-fugitive' -Plug 'tpope/vim-surround' -Plug 'xolox/vim-misc' -Plug 'xolox/vim-notes' -Plug 'junegunn/goyo.vim' -Plug 'lervag/vimtex', {'for' : 'tex'} -Plug 'tpope/vim-vinegar' -Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -Plug 'junegunn/fzf.vim' -Plug 'l04m33/vlime', {'rtp': 'vim/', 'for' : 'lisp'} -Plug 'hecal3/vim-leader-guide' -call plug#end() - -set exrc -set secure - -let g:ft_improved_ignorecase = 1 -let test#strategy = "neoterm" -let g:elm_format_autosave = 1 -"set tags=tags;/ -set tags=./tags,tags;$HOME -set ttyfast -set number -set relativenumber -set hidden -set nocompatible -set lazyredraw -set path+=** -set wildmenu -set ignorecase -set smartcase -set spelllang=en -imap fj -colorscheme shblah - -filetype plugin on -let g:deoplete#enable_at_startup = 1 -if !exists('g:deoplete#omni#input_patterns') - let g:deoplete#omni#input_patterns = {} -endif -au FileType elm set sw=4 sts=4 ts=4 -let g:deoplete#omni_patterns = {} -let g:deoplete#omni_patterns.elm = '\.' -let g:deoplete#sources#go#sort_class = ['func', 'type', 'var', 'const'] -let g:deoplete#sources#go#align_class = 1 -let g:elm_detailed_complete = 1 -autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif -inoremap pumvisible() ? "\" : "\" - -let g:bufferline_echo = 0 - -autocmd FileType typescript nmap i : echo tsuquyomi#hint() -autocmd FileType elm nmap i :ElmShowDocs - - -set runtimepath+=$HOME/.config/nvim/localplug - -let g:vim_markdown_folding_disabled = 1 - -let g:necoghc_enable_detailed_browse = 1 - -augroup pencil - autocmd! - autocmd FileType markdown,mkd call pencil#init() - \ | call lexical#init() - \ | call litecorrect#init() - \ | call textobj#quote#init() - \ | call textobj#sentence#init() -augroup END - -set clipboard+=unnamedplus - -"Tabs -set expandtab -set tabstop=2 -set shiftwidth=2 - -autocmd! BufWritePost * Neomake -function! neomake#makers#ft#typescript#EnabledMakers() - return ['tslint'] -endfunction - -function! neomake#makers#ft#elixir#credo() - return { - \ 'exe': 'mix', - \ 'args': ['credo', 'list', '--strict', '%:p', '--format=oneline', - \ 'readability'], - \ 'errorformat': '[%t] %. %f:%l:%c %m' - \ } -endfunction - -function! neomake#makers#ft#haskell#EnabledMakers() - return ['ghcmod', 'hlint'] -endfunction - -function! neomake#makers#ft#elixir#EnabledMakers() - return ['credo'] -endfunction - - -"snippets -let g:neosnippet#enable_snipmate_compatibility = 1 -let g:neosnippet#snippets_directory='~/.config/nvim/snippets' -let g:AutoPairsMapCR=0 -let g:deoplete#enable_at_startup = 1 -let g:deoplete#enable_smart_case = 1 -imap pumvisible() ? "\" : neosnippet#expandable_or_jumpable() ? "\(neosnippet_expand_or_jump)" : "\" -imap pumvisible() ? "\" : "\" -inoremap pumvisible() ? deoplete#mappings#close_popup() : "\" - -set autoindent -set copyindent -set smarttab - -set smartcase - -:imap fd - -command! -bang -nargs=* Rg - \ call fzf#vim#grep( - \ 'rg --column --line-number --hidden --no-heading --color=always --ignore-case -g "!{.git*,node_modules,Wallpapers,,icons,.themes,.fonts,*quicklisp*}" '.shellescape(), 1, - \ 0 ? fzf#vim#with_preview('up:60%') - \ : fzf#vim#with_preview('right:50%:hidden', '?'), - \ 0) - -"Leader keys -let mapleader="\" -"neoterm -noremap w :w -noremap W :w !sudo tee % > /dev/null -noremap q :q -noremap r :%s/ -noremap f :Rg -noremap t :Tagbar -nmap ev :e $MYVIMRC -nmap sv :so $MYVIMRC -nnoremap bb :Buffers -nnoremap bd :bd -nnoremap bn :bnext! -nnoremap bp :bprevious! -vnoremap < >gv -nnoremap v : vsplit -nnoremap p : Files . -nnoremap gp : GFiles -nnoremap ls : setlocal spell -"" Remap split movement -nmap j j -nmap k k -nmap h h -nmap l l - -"tagbar -let g:tagbar_type_elixir = { - \ 'ctagstype' : 'elixir', - \ 'kinds' : [ - \ 'f:functions', - \ 'functions:functions', - \ 'c:callbacks', - \ 'd:delegates', - \ 'e:exceptions', - \ 'i:implementations', - \ 'a:macros', - \ 'o:operators', - \ 'm:modules', - \ 'p:protocols', - \ 'r:records' - \ ] -\ } - - let g:tagbar_type_rust = { - \ 'ctagstype' : 'rust', - \ 'kinds' : [ - \'T:types,type definitions', - \'f:functions,function definitions', - \'g:enum,enumeration names', - \'s:structure names', - \'m:modules,module names', - \'c:consts,static constants', - \'t:traits,traits', - \'i:impls,trait implementations', - \] - \} - - -"incsearch - -map / (incsearch-forward) -map ? (incsearch-backward) -map g/ (incsearch-stay) - -"Easymotion -function! s:config_easyfuzzymotion(...) abort - return extend(copy({ - \ 'converters': [incsearch#config#fuzzyword#converter()], - \ 'modules': [incsearch#config#easymotion#module({'overwin': 1})], - \ 'keymap': {"\": '(easymotion)'}, - \ 'is_expr': 0, - \ 'is_stay': 1 - \ }), get(a:, 1, {})) -endfunction - -noremap / incsearch#go(config_easyfuzzymotion()) - -"Lightline - -let g:lightline = { - \ 'colorscheme': 'wombat', - \ 'active': { - \ 'left': [ [ 'mode', 'paste' ], - \ [ 'fugitive', 'filename' ], ['bufferline']] - \ }, - \ 'component_function': { - \ 'fugitive': 'LightlineFugitive', - \ 'readonly': 'LightlineReadonly', - \ 'modified': 'LightlineModified', - \ 'filename': 'LightlineFilename', - \ 'bufferline': 'MyBufferline' - \ }, - \ 'separator': { 'left': '', 'right': ''}, - \ 'subseparator': { 'left': '|', 'right': '|' } - \ } - -function! LightlineModified() - if &filetype == "help" - return "" - elseif &modified - return "+" - elseif &modifiable - return "" - else - return "" - endif -endfunction - -function! LightlineReadonly() - if &filetype == "help" - return "" - elseif &readonly - return "" - else - return "" - endif -endfunction - -function! LightlineFugitive() - if exists("*fugitive#head") - let branch = fugitive#head() - return branch !=# '' ? branch : '' - endif - return '' -endfunction - -function! LightlineFilename() - let fname = expand('%:t') - return fname == '__Tagbar__' ? g:lightline.fname : - \ fname =~ 'NERD_tree' ? '' : - \ &ft == 'denite' ? denite#get_status_string() : - \ ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') . - \ ('' != fname ? fname : '[No Name]') . - \ ('' != LightlineModified() ? ' ' . LightlineModified() : '') -endfunction - -function! MyBufferline() - call bufferline#refresh_status() - let b = g:bufferline_status_info.before - let c = g:bufferline_status_info.current - let a = g:bufferline_status_info.after - let alen = strlen(a) - let blen = strlen(b) - let clen = strlen(c) - let w = winwidth(0) * 4 / 9 - if w < alen+blen+clen - let whalf = (w - strlen(c)) / 2 - let aa = alen > whalf && blen > whalf ? a[:whalf] : alen + blen < w - clen || alen < whalf ? a : a[:(w - clen - blen)] - let bb = alen > whalf && blen > whalf ? b[-(whalf):] : alen + blen < w - clen || blen < whalf ? b : b[-(w - clen - alen):] - return (strlen(bb) < strlen(b) ? '...' : '') . bb . c . aa . (strlen(aa) < strlen(a) ? '...' : '') - else - return b . c . a - endif -endfunction - -let g:notes_directories = ['~/Dropbox/Write'] - -set list -set listchars=tab:▸\ ,eol:¬ - -set hidden -let g:racer_cmd = "~/.cargo/bin/racer" -let $RUST_SRC_PATH="~/.multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src" -let g:racer_experimental_completer = 1 - -" Disable haskell-vim omnifunc -let g:haskellmode_completion_ghc = 0 -autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc - -hi! Normal ctermbg=NONE guibg=NONE -hi! NonText ctermbg=NONE guibg=NONE