Created
September 15, 2021 09:20
-
-
Save mritzco/37fd8e7f5e3566fe0292c3d3e55556c2 to your computer and use it in GitHub Desktop.
tmux and VI custom config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Tweak timing between key sequence | |
set -s escape-time 0 | |
## active window title colors | |
set-window-option -g window-status-current-attr bright | |
# Set prefix to Ctrl-Space instead of Ctrl-b | |
unbind C-b | |
set -g prefix C-Space | |
bind Space send-prefix | |
# Split windows using | and - | |
unbind '"' | |
unbind % | |
bind \ split-window -h | |
bind ] split-window -v | |
# Mouse mode | |
set -g mouse on | |
# pane navigation | |
bind -r h select-pane -L # move left | |
bind -r j select-pane -D # move down | |
bind -r k select-pane -U # move up | |
bind -r l select-pane -R # move right | |
bind > swap-pane -D # swap current pane with the next one | |
bind < swap-pane -U # swap current pane with the previous one | |
# maximize current pane | |
bind + run 'cut -c3- ~/.tmux.conf | sh -s _maximize_pane "#{session_name}" #D' | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" Quit vim if nerdtree is last open window | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
" Toggle nerdTREE | |
map <C-n> :Tree<CR> | |
" Enable syntax highlighting | |
"syntax enable | |
if !exists("g:syntax_on") | |
syntax enable | |
endif | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" Setting up Vundle - the vim plugin bundler | |
let iCanHazVundle=1 | |
let vundle_readme=expand('~/.vim/bundle/vundle/README.md') | |
if !filereadable(vundle_readme) | |
echo "Installing Vundle.." | |
echo "" | |
silent !mkdir -p ~/.vim/bundle | |
silent !git clone https://github.com/VundleVim/Vundle.vim ~/.vim/bundle/vundle | |
let iCanHazVundle=0 | |
endif | |
set nocompatible " be iMproved, required | |
filetype off " required | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
"Add your bundles here | |
Plugin 'Syntastic' "uber awesome syntax and errors highlighter | |
Plugin 'https://github.com/tpope/vim-fugitive' "So awesome, it should be illegal | |
Plugin 'scrooloose/nerdtree' "Fily system explorer" | |
Plugin 'mattn/emmet-vim' "HTML crap" | |
Plugin 'bling/vim-airline' "Status for VIM" | |
"...All your other bundles... | |
if iCanHazVundle == 0 | |
echo "Installing Vundles, please ignore key map error messages" | |
echo "" | |
:PluginInstall | |
endif | |
call vundle#end() | |
"must be last | |
filetype plugin indent on " load filetype plugins/indent settings | |
colorscheme murphy | |
syntax on " enable syntax | |
" Setting up Vundle - the vim plugin bundler end | |
"Indents | |
set autoindent | |
set smartindent | |
set expandtab | |
set shiftwidth=2 "space inserted by >> and << command | |
set softtabstop=2 | |
set tabstop=2 | |
set smarttab | |
" Show matching parentheses | |
set showmatch | |
"Allow to delete characters before the first one we inserted in the current | |
"line (behavior of most text editors) | |
set backspace=2 | |
" Enable syntax highlighting for jsdoc | |
let g:javascript_plugin_jsdoc = 1 | |
" Highlight current line and 80 characters limit | |
set cursorline | |
set colorcolumn=80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment