Browse Source

Added no plugin version of vim

master
Micah Halter 12 months ago
parent
commit
98c447650a
Signed by: mehalter GPG Key ID: 4224A6EA9A8CAAA8
  1. 8
      Makefile
  2. 7
      README.md
  3. 154
      vim/vimrc

8
Makefile

@ -1,4 +1,4 @@
.PHONY: install update bash ssh readline starship fzf tmux1 tmux3 vim
.PHONY: install update bash ssh readline starship fzf tmux1 tmux3 vim vim-noplug
install: update ssh bash starship fzf vim
@ -43,3 +43,9 @@ vim:
cp vim/colors/quantum.vim ~/.vim/colors/quantum.vim
cp vim/vimrc ~/.vim/vimrc
vim +'PlugInstall --sync' +qa
vim-noplug:
rm -rf ~/.vim/colors/quantum.vim ~/.vim/vimrc
mkdir -p ~/.vim/colors
cp vim/colors/quantum.vim ~/.vim/colors/quantum.vim
sed '/"==plugins-start/,/"==plugins-end/d' vim/vimrc > ~/.vim/vimrc

7
README.md

@ -52,6 +52,7 @@ Set up [starship prompt](https://github.com/starship/starship) for shells
### FZF
Set up [fzf](https://github.com/junegunn/fzf) for command line fuzzy finding
(git is needed for this install)
```
~$ make fzf
@ -75,6 +76,12 @@ Set up vim configuration files
~$ make vim
```
If git is not available or you don't want to use plug-ins, you can also use
```
~$ make vim-noplug
```
### SSH Keys
Add all public keys (`.pub`) in `ssh/` to `~/.ssh/authorized_keys`

154
vim/vimrc

@ -1,3 +1,4 @@
"==plugins-start
""""""""""""""""""""""""""""
" => Plug
""""""""""""""""""""""""""""
@ -19,6 +20,83 @@ Plug 'https://github.com/tpope/vim-fugitive'
Plug 'https://github.com/vim-scripts/ReplaceWithRegister'
call plug#end()
""""""""""""""""""""""""""""
" => Plugins
""""""""""""""""""""""""""""
" FZF
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0)
map <leader>ff :Files<CR>
map <leader>fm :Marks<CR>
map <leader>fw :Windows<CR>
map <leader>fb :Buffers<CR>
map <leader>fh :History<CR>
map <leader>fg :Tags<CR>
map <leader>ft :BTags<CR>
" goyo
let g:goyo_width=100
let g:goyo_margin_top=2
let g:goyo_margin_bottom=2
nnoremap <silent> <leader>z :Goyo<CR>
" lightline
let g:lightline = {
\ 'colorscheme': 'quantum',
\ 'active': {
\ 'left': [ ['mode', 'paste'],
\ ['fugitive', 'readonly', 'filename', 'modified'] ],
\ 'right': [ [ 'lineinfo' ], ['percent'] ]
\ },
\ 'component': {
\ 'readonly': '%{&filetype=="help"?"":&readonly?"🔒":""}',
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}',
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}'
\ },
\ 'component_visible_condition': {
\ 'readonly': '(&filetype!="help"&& &readonly)',
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))',
\ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())'
\ },
\ 'separator': { 'left': ' ', 'right': ' ' },
\ 'subseparator': { 'left': ' ', 'right': ' ' }
\ }
" gitgutter
let g:gitgutter_enabled = 0
map <leader>d :GitGutterToggle<CR>
" julia
let g:latex_to_unicode_auto = 1
let g:default_julia_version = "1.0"
" netrw
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_winsize = 20
map <leader>nn :call ToggleNetrw()<CR>
let g:NetrwIsOpen=0
function! ToggleNetrw() abort
if g:NetrwIsOpen
let i = bufnr("$")
while (i >= 1)
if (getbufvar(i, "&filetype") == "netrw")
silent exe "bwipeout " . i
endif
let i-=1
endwhile
let g:NetrwIsOpen=0
else
let g:NetrwIsOpen=1
silent Vexplore
endif
endfunction
"==plugins-end
""""""""""""""""""""""""""""
" => General
""""""""""""""""""""""""""""
@ -117,82 +195,6 @@ function! HasPaste() abort
return ''
endfunction
""""""""""""""""""""""""""""
" => Plugins
""""""""""""""""""""""""""""
" FZF
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0)
map <leader>ff :Files<CR>
map <leader>fm :Marks<CR>
map <leader>fw :Windows<CR>
map <leader>fb :Buffers<CR>
map <leader>fh :History<CR>
map <leader>fg :Tags<CR>
map <leader>ft :BTags<CR>
" goyo
let g:goyo_width=100
let g:goyo_margin_top=2
let g:goyo_margin_bottom=2
nnoremap <silent> <leader>z :Goyo<CR>
" lightline
let g:lightline = {
\ 'colorscheme': 'quantum',
\ 'active': {
\ 'left': [ ['mode', 'paste'],
\ ['fugitive', 'readonly', 'filename', 'modified'] ],
\ 'right': [ [ 'lineinfo' ], ['percent'] ]
\ },
\ 'component': {
\ 'readonly': '%{&filetype=="help"?"":&readonly?"🔒":""}',
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}',
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}'
\ },
\ 'component_visible_condition': {
\ 'readonly': '(&filetype!="help"&& &readonly)',
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))',
\ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())'
\ },
\ 'separator': { 'left': ' ', 'right': ' ' },
\ 'subseparator': { 'left': ' ', 'right': ' ' }
\ }
" gitgutter
let g:gitgutter_enabled = 0
map <leader>d :GitGutterToggle<CR>
" julia
let g:latex_to_unicode_auto = 1
let g:default_julia_version = "1.0"
" netrw
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_winsize = 20
map <leader>nn :call ToggleNetrw()<CR>
let g:NetrwIsOpen=0
function! ToggleNetrw() abort
if g:NetrwIsOpen
let i = bufnr("$")
while (i >= 1)
if (getbufvar(i, "&filetype") == "netrw")
silent exe "bwipeout " . i
endif
let i-=1
endwhile
let g:NetrwIsOpen=0
else
let g:NetrwIsOpen=1
silent Vexplore
endif
endfunction
""""""""""""""""""""""""""""
" => Remaps
""""""""""""""""""""""""""""

Loading…
Cancel
Save