From 5a7d648c17316f70e903b9b6718c972de6a9df97 Mon Sep 17 00:00:00 2001 From: hc Date: Mon, 23 Mar 2026 20:12:32 +0800 Subject: add mac dotfiles for vim and tmux --- core/mac/.tmux.conf | 11 +++++++++++ core/mac/.vimrc | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 core/mac/.tmux.conf create mode 100644 core/mac/.vimrc diff --git a/core/mac/.tmux.conf b/core/mac/.tmux.conf new file mode 100644 index 0000000..fc4b931 --- /dev/null +++ b/core/mac/.tmux.conf @@ -0,0 +1,11 @@ +# Vi mode for copy +setw -g mode-keys vi + +# Mouse selection +set -g mouse on + +# v to start selection, y to yank (like vim) +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi y send-keys -X copy-pipe-no-clear "pbcopy" +bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-no-clear "pbcopy" +bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "pbcopy" diff --git a/core/mac/.vimrc b/core/mac/.vimrc new file mode 100644 index 0000000..c45cfc9 --- /dev/null +++ b/core/mac/.vimrc @@ -0,0 +1,51 @@ + +" Enable line wrapping +set wrap + +" Optional: Make wrapped lines easier to read by indenting them +set breakindent +set breakindentopt=shift:1 + +syntax on +set autoindent +set number +set mouse=a +set expandtab +set shiftwidth=4 +set softtabstop=4 +set tabstop=4 + +set autoindent +set smartindent +filetype plugin indent on + +set laststatus=2 " permanent status bar +set statusline=%F " shows full file path + +if (has("termguicolors")) + set termguicolors +endif + +colorscheme zellner +"colorscheme evening + +" Ctrl+A: Move to the beginning of the line in INSERT mode +inoremap + +" Ctrl+E: Move to the end of the line in INSERT mode +inoremap + +" Ctrl+A: Move to the beginning of the line in NORMAL mode +nnoremap 0 + +" Ctrl+E: Move to the end of the line in NORMAL mode +nnoremap $ +set clipboard=unnamed,unnamedplus +setlocal regexpengine=2 +set hlsearch +set foldcolumn=12 " Creates a small left margin of 2 columns +set noswapfile +autocmd InsertLeave * silent! update + + + -- cgit