diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml index 211b6fb..7abc69a 100644 --- a/alacritty/.config/alacritty/alacritty.toml +++ b/alacritty/.config/alacritty/alacritty.toml @@ -19,4 +19,4 @@ action = "DecreaseFontSize" [font] normal.family = "GoMono Nerd Font" -size=12 +size=14 diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 167d0e8..2413627 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -38,6 +38,10 @@ vim.cmd [[ nnoremap L $ xnoremap H ^ xnoremap L $ + nnoremap + nnoremap + nnoremap ,a + nnoremap ,x nnoremap ,cD :call setqflist(filter(getqflist(), 'v:val != getqflist()[getqflist({"idx": 0}).idx - 1]')) @@ -70,6 +74,16 @@ vim.cmd [[ set errorformat^=[----]\ %f:%l:\ %m ]] +vim.o.backup = false +vim.o.writebackup = false +vim.o.swapfile = false +vim.o.autoread = true +vim.o.undofile = true +vim.o.undodir = vim.fn.expand("~/.vim/neoundodir") +if vim.fn.isdirectory(vim.o.undodir) == 0 then + vim.fn.mkdir(vim.o.undodir, "p") +end + vim.keymap.set('n', ',cf', function() local qf = vim.fn.getqflist() for i, item in ipairs(qf) do @@ -350,13 +364,13 @@ require'lazy'.setup{ --{{{1 end, }, { 'f-person/git-blame.nvim', --{{{2 - keys = {',a'}, + keys = {',g'}, config = function () require'gitblame'.setup{ enabled = false, } vim.cmd[[ - nnoremap ,a :GitBlameToggle + nnoremap ,g :GitBlameToggle ]] end }, @@ -529,12 +543,6 @@ require'lazy'.setup{ --{{{1 } end, }, - { 'kdheepak/lazygit.nvim', --{{{2 - lazy = true, - cmd = { 'LazyGit', 'LazyGitConfig', 'LazyGitCurrentFile', 'LazyGitFilter', 'LazyGitFilterCurrentFile', }, - dependencies = { 'nvim-lua/plenary.nvim', }, - keys = { { ',g', 'LazyGit', desc = 'LazyGit' }, }, - }, { 'mfussenegger/nvim-dap', --{{{2 dependencies = { 'nvim-treesitter/nvim-treesitter', diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf new file mode 100644 index 0000000..d1e4a3f --- /dev/null +++ b/tmux/.tmux.conf @@ -0,0 +1,43 @@ +# Rebind prefix key to Ctrl+a for easier access +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix + +unbind c +bind c new-window -c "#{pane_current_path}" + +bind r source-file ~/.tmux.conf \; display "Reloaded!" + +set -g mouse on + +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +bind | split-window -h +bind - split-window -v + +bind g popup -E -w 100% -h 100% -d "#{pane_current_path}" -B lazygit + +set -g default-terminal "tmux-256color" +set -as terminal-overrides ",xterm-256color:Tc" + +black="#000000" +gray_light="#D8DEE9" +gray_medium="#ABB2BF" +gray_dark="#3B4252" +green_soft="#A3BE8C" +blue_muted="#81A1C1" +cyan_soft="#88C0D0" +set -g status-position top +set -g status-left-length 100 +set -g status-style "fg=${gray_light},bg=default" +set -g status-left "#[fg=${green_soft},bold] #S #[fg=${gray_light},nobold]| " +set -g status-right "#[fg=${gray_dark}]%H:%M" +set -g window-status-current-format "#[fg=${cyan_soft}]#[fg=${black},bg=${cyan_soft},bold]#I:#W#[fg=${cyan_soft},bg=default]" +set -g window-status-format " #I:#W " +set -g message-style "fg=${gray_light},bg=default" +set -g mode-style "fg=${gray_dark},bg=${blue_muted}" +set -g pane-border-style "fg=${gray_dark}" +set -g pane-active-border-style "fg=${gray_medium}" diff --git a/vim/.vimrc b/vim/.vimrc index 036baad..c3fde5f 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -1,3 +1,5 @@ +colorscheme unokai + autocmd BufEnter *__virtual* setlocal buftype=nofile bufhidden=hide noswapfile autocmd BufNewFile,BufRead *.h set filetype=c autocmd BufWinEnter *.* silent! loadview @@ -31,8 +33,28 @@ nnoremap :cprevious nnoremap zz nnoremap H ^ nnoremap L $ + +" i use ctrl-a for the tmux prefix key +nnoremap +nnoremap +nnoremap ,a +nnoremap ,x + set autoindent set cursorline + +set nobackup +set nowritebackup +set noswapfile +set autoread +set undofile +set undodir=~/.vim/undodir +if !isdirectory(expand('~/.vim/undodir')) + call mkdir(expand('~/.vim/undodir'), 'p') +endif + +set undodir=~/.vim/undodir +set undofile set errorformat^=[----]\ %f:%l:\ %m set expandtab set exrc @@ -58,3 +80,30 @@ xnoremap L $ if has('clipboard') set clipboard^=unnamed,unnamedplus endif + +nnoremap 'A 'A'" +nnoremap 'B 'B'" +nnoremap 'C 'C'" +nnoremap 'D 'D'" +nnoremap 'E 'E'" +nnoremap 'F 'F'" +nnoremap 'G 'G'" +nnoremap 'H 'H'" +nnoremap 'I 'I'" +nnoremap 'J 'J'" +nnoremap 'K 'K'" +nnoremap 'L 'L'" +nnoremap 'M 'M'" +nnoremap 'N 'N'" +nnoremap 'O 'O'" +nnoremap 'P 'P'" +nnoremap 'Q 'Q'" +nnoremap 'R 'R'" +nnoremap 'S 'S'" +nnoremap 'T 'T'" +nnoremap 'U 'U'" +nnoremap 'V 'V'" +nnoremap 'W 'W'" +nnoremap 'X 'X'" +nnoremap 'Y 'Y'" +nnoremap 'Z 'Z'"