Browse Source

Misc neovim + tmux QOL changes

pull/2/head
Josh Wolfe 5 months ago
parent
commit
3c16bf04de
  1. 23
      neovim/.config/nvim/init.vim
  2. 6
      neovim/.config/nvim/lua/plugins.lua
  3. 8
      tmux/.tmux.conf
  4. 5
      zsh/.zshrc

23
neovim/.config/nvim/init.vim

@ -1,12 +1,17 @@ @@ -1,12 +1,17 @@
lua require('plugins')
colorscheme jellybeans
let base16colorspace=256
colorscheme base16-default-dark
set tabstop=4
set shiftwidth=4
set expandtab
set smartindent
set number relativenumber
set ignorecase
set scrolloff=10
set splitbelow
set splitright
" Keybindings {{{
@ -41,4 +46,20 @@ nnoremap <leader>lr <cmd>lua vim.lsp.buf.rename()<cr> @@ -41,4 +46,20 @@ nnoremap <leader>lr <cmd>lua vim.lsp.buf.rename()<cr>
nnoremap <leader>lu <cmd>Telescope lsp_references<cr>
nnoremap <leader>li <cmd>Telescope lsp_implementations<cr>
nnoremap <leader>e :e <C-R>=expand("%:p:h") . "/" <CR>
" }}}
" Functions {{{
" Use :W to sudo write file
command! W w !sudo tee % > /dev/null
" Command to remove trailing whitespace
function! TrimWhitespace()
exec "%s/\\s\\+$//e"
exec "normal! \<C-o>"
endfunction
command! -nargs=0 TrimWhitespace :call TrimWhitespace()
" }}}

6
neovim/.config/nvim/lua/plugins.lua

@ -9,6 +9,7 @@ return require('packer').startup(function() @@ -9,6 +9,7 @@ return require('packer').startup(function()
use 'wbthomason/packer.nvim'
use 'nanotech/jellybeans.vim'
use 'chriskempson/base16-vim'
use 'tpope/vim-surround'
use 'tpope/vim-repeat'
@ -85,6 +86,11 @@ return require('packer').startup(function() @@ -85,6 +86,11 @@ return require('packer').startup(function()
end
}
use {
'maxmellon/vim-jsx-pretty',
requires = {'leafgarland/typescript-vim'},
}
if packer_bootstrap then
require('packer').sync()
end

8
tmux/.tmux.conf

@ -32,8 +32,10 @@ set-window-option -g automatic-rename @@ -32,8 +32,10 @@ set-window-option -g automatic-rename
##
set-option -g prefix C-b
# set window split
bind-key v split-window -h
bind-key h split-window
bind-key % split-window -h -c "#{pane_current_path}"
bind-key '"' split-window -c "#{pane_current_path}"
bind-key v split-window -h -c "#{pane_current_path}"
bind-key h split-window -c "#{pane_current_path}"
# Vi copypaste mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
@ -45,6 +47,8 @@ bind -n M-j select-pane -D @@ -45,6 +47,8 @@ bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# create new windows
bind-key c new-window -c "#{pane_current_path}"
bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'"
# set to main-horizontal, 60% height for main pane

5
zsh/.zshrc

@ -215,3 +215,8 @@ source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh @@ -215,3 +215,8 @@ source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
in_path virtualenvwrapper.sh && source virtualenvwrapper.sh
in_path flux && . <(flux completion zsh)
BASE16_SHELL="$HOME/.config/base16-shell/"
[ -n "$PS1" ] && \
[ -s "$BASE16_SHELL/profile_helper.sh" ] && \
eval "$("$BASE16_SHELL/profile_helper.sh")" &&\

Loading…
Cancel
Save