https://github.com/ballercat/vim_configs
vim configs
https://github.com/ballercat/vim_configs
Last synced: 3 months ago
JSON representation
vim configs
- Host: GitHub
- URL: https://github.com/ballercat/vim_configs
- Owner: ballercat
- License: mit
- Created: 2023-01-14T16:06:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-27T12:04:55.000Z (about 3 years ago)
- Last Synced: 2025-01-28T08:51:14.639Z (over 1 year ago)
- Language: Vim Script
- Size: 41 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vim Configs
Using `vim-plug`.
## Install
Clone
```
git clone git@github.com:ballercat/vim_configs.git .vim_runtime
```
Update `.vimrc`
```
cat <> .vimrc
set runtimepath+=~/.vim_runtime
source ~/.vim_runtime/vimrcs/basic.vim
source ~/.vim_runtime/vimrcs/filetypes.vim
source ~/.vim_runtime/vimrcs/plugins_config.vim
source ~/.vim_runtime/vimrcs/extended.vim
source ~/.vim_runtime/my_configs.vim
EOT
```
`~/.tmux.conf`
```
# remap prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# vi bindings
setw -g mode-keys vi
set -g default-shell $SHELL
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
set -as terminal-overrides ',xterm*:sitm=\E[3m'
set -g default-terminal "tmux"
#set -as terminal-overrides ',xterm*:sitm=\E[3m'
# copy to clipboard from vi-mode
#bind -t vi-copy y copy-pipe 'pbcopy -in -selection clipboard'
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
# bind-key -Tcopy-mode-vi 'y' send -X copy-pipe "reattach-to-user-namespace pbcopy"
# enable mouse scrolling
set-option -g mouse on
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
```