summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorhc <hc@email.ch>2026-03-23 20:12:32 +0800
committerhc <hc@email.ch>2026-03-23 20:12:32 +0800
commit5a7d648c17316f70e903b9b6718c972de6a9df97 (patch)
tree01a4f613ba90755c7fdec361b2b790df649b92f2 /core
parent3c1ea83aabd414ff2ec2209a035994543dcfd466 (diff)
add mac dotfiles for vim and tmux
Diffstat (limited to 'core')
-rw-r--r--core/mac/.tmux.conf11
-rw-r--r--core/mac/.vimrc51
2 files changed, 62 insertions, 0 deletions
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 @@
1# Vi mode for copy
2setw -g mode-keys vi
3
4# Mouse selection
5set -g mouse on
6
7# v to start selection, y to yank (like vim)
8bind-key -T copy-mode-vi v send-keys -X begin-selection
9bind-key -T copy-mode-vi y send-keys -X copy-pipe-no-clear "pbcopy"
10bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-no-clear "pbcopy"
11bind-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 @@
1
2" Enable line wrapping
3set wrap
4
5" Optional: Make wrapped lines easier to read by indenting them
6set breakindent
7set breakindentopt=shift:1
8
9syntax on
10set autoindent
11set number
12set mouse=a
13set expandtab
14set shiftwidth=4
15set softtabstop=4
16set tabstop=4
17
18set autoindent
19set smartindent
20filetype plugin indent on
21
22set laststatus=2 " permanent status bar
23set statusline=%F " shows full file path
24
25if (has("termguicolors"))
26 set termguicolors
27endif
28
29colorscheme zellner
30"colorscheme evening
31
32" Ctrl+A: Move to the beginning of the line in INSERT mode
33inoremap <C-a> <Home>
34
35" Ctrl+E: Move to the end of the line in INSERT mode
36inoremap <C-e> <End>
37
38" Ctrl+A: Move to the beginning of the line in NORMAL mode
39nnoremap <C-a> 0
40
41" Ctrl+E: Move to the end of the line in NORMAL mode
42nnoremap <C-e> $
43set clipboard=unnamed,unnamedplus
44setlocal regexpengine=2
45set hlsearch
46set foldcolumn=12 " Creates a small left margin of 2 columns
47set noswapfile
48autocmd InsertLeave * silent! update
49
50
51