modified init.vim somewhat
This commit is contained in:
parent
0dd873a3ee
commit
b4fb62514e
@ -1,4 +1,4 @@
|
|||||||
let mapleader =","
|
let mapleader ="/"
|
||||||
|
|
||||||
if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"'))
|
if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"'))
|
||||||
echo "Downloading junegunn/vim-plug to manage plugins..."
|
echo "Downloading junegunn/vim-plug to manage plugins..."
|
||||||
@ -12,7 +12,6 @@ Plug 'tpope/vim-surround'
|
|||||||
Plug 'preservim/nerdtree'
|
Plug 'preservim/nerdtree'
|
||||||
Plug 'junegunn/goyo.vim'
|
Plug 'junegunn/goyo.vim'
|
||||||
Plug 'jreybert/vimagit'
|
Plug 'jreybert/vimagit'
|
||||||
Plug 'lukesmithxyz/vimling'
|
|
||||||
Plug 'vimwiki/vimwiki'
|
Plug 'vimwiki/vimwiki'
|
||||||
Plug 'vim-airline/vim-airline'
|
Plug 'vim-airline/vim-airline'
|
||||||
Plug 'tpope/vim-commentary'
|
Plug 'tpope/vim-commentary'
|
||||||
@ -59,13 +58,6 @@ set noshowcmd
|
|||||||
let NERDTreeBookmarksFile = '~/.vim' . '/NERDTreeBookmarks'
|
let NERDTreeBookmarksFile = '~/.vim' . '/NERDTreeBookmarks'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" vimling:
|
|
||||||
nm <leader><leader>d :call ToggleDeadKeys()<CR>
|
|
||||||
imap <leader><leader>d <esc>:call ToggleDeadKeys()<CR>a
|
|
||||||
nm <leader><leader>i :call ToggleIPA()<CR>
|
|
||||||
imap <leader><leader>i <esc>:call ToggleIPA()<CR>a
|
|
||||||
nm <leader><leader>q :call ToggleProse()<CR>
|
|
||||||
|
|
||||||
" Shortcutting split navigation, saving a keypress:
|
" Shortcutting split navigation, saving a keypress:
|
||||||
map <C-h> <C-w>h
|
map <C-h> <C-w>h
|
||||||
map <C-j> <C-w>j
|
map <C-j> <C-w>j
|
||||||
@ -78,10 +70,6 @@ set noshowcmd
|
|||||||
" Check file in shellcheck:
|
" Check file in shellcheck:
|
||||||
map <leader>s :!clear && shellcheck -x %<CR>
|
map <leader>s :!clear && shellcheck -x %<CR>
|
||||||
|
|
||||||
" Open my bibliography file in split
|
|
||||||
map <leader>b :vsp<space>$BIB<CR>
|
|
||||||
map <leader>r :vsp<space>$REFER<CR>
|
|
||||||
|
|
||||||
" Replace all is aliased to S.
|
" Replace all is aliased to S.
|
||||||
nnoremap S :%s//g<Left><Left>
|
nnoremap S :%s//g<Left><Left>
|
||||||
|
|
||||||
@ -105,12 +93,6 @@ set noshowcmd
|
|||||||
" Save file as sudo on files that require root permission
|
" Save file as sudo on files that require root permission
|
||||||
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
|
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
|
||||||
|
|
||||||
" Enable Goyo by default for mutt writing
|
|
||||||
autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80
|
|
||||||
autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo | set bg=light
|
|
||||||
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR>
|
|
||||||
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR>
|
|
||||||
|
|
||||||
" Automatically deletes all trailing whitespace and newlines at end of file on save. & reset cursor position
|
" Automatically deletes all trailing whitespace and newlines at end of file on save. & reset cursor position
|
||||||
autocmd BufWritePre * let currPos = getpos(".")
|
autocmd BufWritePre * let currPos = getpos(".")
|
||||||
autocmd BufWritePre * %s/\s\+$//e
|
autocmd BufWritePre * %s/\s\+$//e
|
||||||
@ -123,8 +105,6 @@ set noshowcmd
|
|||||||
" Run xrdb whenever Xdefaults or Xresources are updated.
|
" Run xrdb whenever Xdefaults or Xresources are updated.
|
||||||
autocmd BufRead,BufNewFile Xresources,Xdefaults,xresources,xdefaults set filetype=xdefaults
|
autocmd BufRead,BufNewFile Xresources,Xdefaults,xresources,xdefaults set filetype=xdefaults
|
||||||
autocmd BufWritePost Xresources,Xdefaults,xresources,xdefaults !xrdb %
|
autocmd BufWritePost Xresources,Xdefaults,xresources,xdefaults !xrdb %
|
||||||
" Recompile dwmblocks on config edit.
|
|
||||||
autocmd BufWritePost ~/.local/src/dwmblocks/config.h !cd ~/.local/src/dwmblocks/; sudo make install && { killall -q dwmblocks;setsid -f dwmblocks }
|
|
||||||
|
|
||||||
" Turns off highlighting on the bits of code that are changed, so the line that is changed is highlighted but the actual text that has changed stands out on the line and is readable.
|
" Turns off highlighting on the bits of code that are changed, so the line that is changed is highlighted but the actual text that has changed stands out on the line and is readable.
|
||||||
if &diff
|
if &diff
|
||||||
@ -149,8 +129,3 @@ function! ToggleHiddenAll()
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
nnoremap <leader>h :call ToggleHiddenAll()<CR>
|
nnoremap <leader>h :call ToggleHiddenAll()<CR>
|
||||||
" Load command shortcuts generated from bm-dirs and bm-files via shortcuts script.
|
|
||||||
" Here leader is ";".
|
|
||||||
" So ":vs ;cfz" will expand into ":vs /home/<user>/.config/zsh/.zshrc"
|
|
||||||
" if typed fast without the timeout.
|
|
||||||
" source ~/.config/nvim/shortcuts.vim
|
|
||||||
|
|||||||
6
.zshrc
6
.zshrc
@ -113,6 +113,7 @@ alias ls='ls -la --color=auto'
|
|||||||
alias tmn='tmux new'
|
alias tmn='tmux new'
|
||||||
alias tma='tmux attach'
|
alias tma='tmux attach'
|
||||||
alias lf='lfub'
|
alias lf='lfub'
|
||||||
|
alias v='nvim'
|
||||||
|
|
||||||
path+=('/home/solomon/.local/bin')
|
path+=('/home/solomon/.local/bin')
|
||||||
|
|
||||||
@ -207,7 +208,12 @@ ZSH_HIGHLIGHT_STYLES[arg0]='fg=#F8F8F2'
|
|||||||
ZSH_HIGHLIGHT_STYLES[default]='fg=#F8F8F2'
|
ZSH_HIGHLIGHT_STYLES[default]='fg=#F8F8F2'
|
||||||
ZSH_HIGHLIGHT_STYLES[cursor]='standout'
|
ZSH_HIGHLIGHT_STYLES[cursor]='standout'
|
||||||
|
|
||||||
|
if [ -f /etc/hostname ]; then
|
||||||
|
HOST=$(cat /etc/hostname)
|
||||||
|
else
|
||||||
HOST=$(hostname)
|
HOST=$(hostname)
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$HOST" = "holocene" ] ; then
|
if [ "$HOST" = "holocene" ] ; then
|
||||||
source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh
|
source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user