aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------dwm0
-rw-r--r--tmux/.tmux.conf3
-rwxr-xr-xupdate.sh2
-rw-r--r--vim/.vimrc141
4 files changed, 71 insertions, 75 deletions
diff --git a/dwm b/dwm
-Subproject 39d86bd3ffb4c35a0d5d6ede5798bddc00c3f42
+Subproject 12da4da048d58c8de57d17badd4063a0e8934ed
diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf
index f930ac5..1b0d4fe 100644
--- a/tmux/.tmux.conf
+++ b/tmux/.tmux.conf
@@ -1,6 +1,7 @@
-set -g prefix C-a
+set -g prefix M-Space
set -g visual-activity on
set -g status-style fg=white,bg=black
+set-window-option -g window-status-bell-style fg=white,bg=red,bold
set-window-option -g mode-keys vi
set -g status-right "#[fg=green,bg=default]#{pane_current_path}"
set -ag status-right " #[fg=yellow,bg=default]%I:%M%p "
diff --git a/update.sh b/update.sh
index e34263a..410011d 100755
--- a/update.sh
+++ b/update.sh
@@ -10,3 +10,5 @@ cp ~/.vim/coc-settings.json ./vim
cp ~/.xinitrc* ./x
cp ~/.Xresources ./x
+git submodule update --remote --merge
+
diff --git a/vim/.vimrc b/vim/.vimrc
index ee8f046..27bec12 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -1,13 +1,24 @@
+" file stuff
filetype plugin on
syntax enable
-let g:vimtex_compiler_method = 'arara'
-let maplocalleader = "\\"
+" Plug plugins
+call plug#begin()
+
+ Plug 'neoclide/coc.nvim', {'branch': 'release'}
+ Plug 'itchyny/lightline.vim'
+ Plug 'jceb/vim-orgmode'
+ Plug 'tpope/vim-speeddating'
+ Plug 'ryanoasis/vim-devicons'
+ Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
+ Plug 'lervag/vimtex'
+ Plug 'preservim/nerdtree'
+ Plug 'itchyny/vim-gitbranch'
+
+call plug#end()
+
+" sets
set nocompatible
-let g:gruvbox_contrast_dark = 'soft'
-let g:gruvbox_termcolors = '16'
-let g:python_recommended_style = 0
-colorscheme gruvbox
set ttymouse=sgr
set number
set bg:dark
@@ -25,6 +36,47 @@ set ttimeout ttimeoutlen=25
set showtabline=2
set undodir=~/.vim/undo-dir
set undofile
+set backupdir=$HOME/.vim/backups
+set noshowmode
+
+" lets
+let g:vimtex_compiler_method = 'arara'
+let maplocalleader = "\\"
+let mapleader = " "
+let g:gruvbox_contrast_dark = 'soft'
+let g:gruvbox_termcolors = '16'
+let g:python_recommended_style = 0
+let g:NERDTreeFileExtensionHighlightFullName = 1
+let g:NERDTreeExactMatchHighlightFullName = 1
+let g:NERDTreePatternMatchHighlightFullName = 1
+
+" colorscheme stuff
+colorscheme gruvbox
+
+" fix colorscheme colors
+hi Normal ctermbg=NONE
+
+" remaps
+nnoremap <SPACE> <Nop>
+nnoremap <leader>w :w<CR>
+nnoremap <leader>q :q<CR>
+nnoremap <leader>! :q!<CR>
+nnoremap <leader>x :wq<CR>
+nnoremap <leader>n :NERDTreeFocus<CR>
+nnoremap <leader>t :NERDTreeToggle<CR>
+nnoremap <leader>p :wincmd p<CR>
+nnoremap <leader>v :set paste! number! \| :NERDTreeToggle \| :wincmd p<CR>
+
+" nerdtree stuff
+" Start NERDTree. If a file is specified, move the cursor to its window.
+"autocmd StdinReadPre * let s:std_in=1
+"autocmd VimEnter * NERDTree | if argc() > 0 || exists("s:std_in") | wincmd p | endif
+" Exit Vim if NERDTree is the only window remaining in the only tab.
+autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
+" Close the tab if NERDTree is the only window remaining in it.
+autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
+" Open the existing NERDTree on each new tab.
+autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
" turn on spell checker for all markdown files
autocmd FileType markdown setlocal spell
@@ -37,17 +89,7 @@ hi SpellCap cterm=underline
hi clear SpellLocal
hi SpellLocal cterm=underline
-call plug#begin()
-
-Plug 'neoclide/coc.nvim', {'branch': 'release'}
-Plug 'jaxbot/semantic-highlight.vim'
-Plug 'itchyny/lightline.vim'
-Plug 'jceb/vim-orgmode'
-Plug 'tpope/vim-speeddating'
-Plug 'lervag/vimtex'
-
-call plug#end()
-
+" Coc remaps
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
@@ -59,69 +101,20 @@ function! s:check_back_space() abort
return !col || getline('.')[col - 1] =~# '\s'
endfunction
-"let s:semanticGUIColors = [ "#cc241d", "#98971a", "#d79921", "#458588", "#b16286", "#689d6a", "#928374", "#fb4934", "#b8bb26", "#fabd2f", "#83a598", "#d3869b", "#8ec07c", "#ebdbb2" ]
-
-
-" stolen from https://shapeshed.com/vim-statuslines/
-"function! GitBranch()
-" return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
-" let g:gitparsedbranchname = strlen(l:string) > 0?'['.l:string.']':''
-"endfunction
-
-"function! StatuslineGit()
-" let l:branchname = GitBranch()
-" return strlen(l:branchname) > 0?' '.l:branchname.' ':''
-"endfunction
-
-"function! InsertStatuslineColor(mode)
-" if a:mode == 'i'
-" hi statusline guibg=Cyan ctermfg=6 guifg=Black ctermbg=0
-" elseif a:mode == 'r'
-" hi statusline guibg=Purple ctermfg=5 guifg=Black ctermbg=0
-" else
-" hi statusline guibg=DarkRed ctermfg=1 guifg=Black ctermbg=0
-" endif
-"endfunction
-
-"au InsertEnter * call InsertStatuslineColor(v:insertmode)
-"au InsertLeave * hi statusline guibg=DarkGrey ctermfg=8 guifg=White ctermbg=15
-
-set statusline=
-"set statusline+=%#PmenuSel#
-"set statusline+=%{StatuslineGit()}
-"set statusline+=%#LineNr#
-set statusline+=\ %F
-set statusline+=\ %y
-set statusline+=\ %m
-set statusline+=\ %r
-set statusline+=%=
-set statusline+=%#CursorColumn#
-"set statusline+=\ %L\ lines
-"set statusline+=\ %y
-"set statusline+=\
-set statusline+=\ %{&fileencoding?&fileencoding:&encoding}
-"set statusline+=" >"
-set statusline+=\ [%{&fileformat}\]
-"set statusline+=" >"
-set statusline+=\ %p%%
-"set statusline+=" >"
-set statusline+=\ %l/%L:%c
-set statusline+=\
-
-
-"hi StatusLine ctermbg=black
-hi Normal ctermbg=NONE
let g:lightline = {
\ 'colorscheme': 'gruvbox',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
- \ [ 'filename', 'readonly', 'modified' ] ],
+ \ [ 'filename', 'readonly', 'modified' ],
+ \ [ 'gitbranch'] ],
\ 'right': [ [ 'lineinfo' ],
- \ [ 'fileformat', 'fileencoding', 'filetype' ] ]
+ \ [ 'fileformat', 'fileencoding', 'filetype' ],
+ \ [ 'percent' ] ]
\ },
\ 'component_function': {
- \ 'cocstatus': 'coc#status',
- \ 'currentfunction': 'CocCurrentFunction'
+ \ 'gitbranch': 'gitbranch#name'
\ },
\ }
-set noshowmode
+let g:lightline.component = {
+ \ 'close': ' %n | X ', }
+