-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from DMcP89/dev
Dev
- Loading branch information
Showing
7 changed files
with
157 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
-- Set nocompatible | ||
vim.o.compatible = false | ||
-- Plugins | ||
|
||
local vim = vim | ||
local Plug = vim.fn['plug#'] | ||
|
||
vim.call('plug#begin') | ||
|
||
Plug('tpope/vim-fugitive') | ||
Plug('fatih/vim-go') | ||
Plug('preservim/nerdtree') | ||
Plug('junegunn/fzf', { ['do'] = function() | ||
vim.fn['fzf#install']() | ||
end }) | ||
Plug('ap/vim-buftabline') | ||
|
||
vim.call('plug#end') | ||
|
||
-- Colors | ||
vim.cmd('syntax enable') | ||
vim.cmd('colorscheme slate') | ||
|
||
-- UI | ||
vim.o.number = false -- line numbers | ||
vim.o.relativenumber = true -- relative line numbers | ||
vim.o.showcmd = true -- show command in bottom bar | ||
vim.o.cursorline = true -- highlight current line | ||
vim.o.wildmenu = true -- visual autocomplete for command menu | ||
vim.o.lazyredraw = true -- redraw only when we need to. | ||
vim.o.showmatch = true -- highlight matching [{()}] | ||
vim.o.incsearch = true -- search as characters are entered | ||
vim.o.hlsearch = true -- highlight matches | ||
vim.o.expandtab = true -- expand tabs into spaces | ||
vim.o.tabstop = 4 -- tabs equal 4 spaces | ||
vim.o.shiftwidth = 4 -- >> or << commands shift lines 4 spaces | ||
|
||
vim.cmd('filetype indent on') -- load filetype-specific indent files | ||
|
||
-- Buffer Management | ||
vim.cmd('nnoremap <C-L> :bnext<CR>') | ||
vim.cmd('nnoremap <C-H> :bprev<CR>') | ||
vim.cmd('nnoremap <C-x> :bd<CR>') | ||
|
||
-- Toggle serach highlight | ||
vim.cmd('nnoremap <Leader>h :nohlsearch<CR>') | ||
|
||
-- Folding Settings | ||
vim.o.foldenable = true --enable folding | ||
vim.o.foldlevelstart = 10 --open most folds by default | ||
vim.o.foldnestmax = 10 -- 10 nested fold max | ||
vim.ofoldmethod = indent | ||
-- space open/closes folds | ||
vim.cmd('nnoremap <space> za') | ||
|
||
-- Search and Replace | ||
vim.cmd('nnoremap <Leader>r :%s/<C-r><C-w>//g<Left><Left>') | ||
|
||
|
||
-- Auto close brackets | ||
vim.cmd('inoremap { {}<Esc>ha') | ||
vim.cmd('inoremap ( ()<Esc>ha') | ||
vim.cmd('inoremap [ []<Esc>ha') | ||
vim.cmd('inoremap " ""<Esc>ha') | ||
vim.cmd("inoremap ' ''<Esc>ha") | ||
vim.cmd('inoremap ` ``<Esc>ha') | ||
|
||
|
||
-- disable arrow keys | ||
vim.cmd('noremap <Up> <Nop>') | ||
vim.cmd('noremap <Down> <Nop>') | ||
vim.cmd('noremap <Left> <Nop>') | ||
vim.cmd('noremap <Right> <Nop>') | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
set editing-mode vi | ||
set show-mode-in-prompt on | ||
set vi-cmd-mode-string "\1\e[1;48;5;246;38;5;237m\2 CMD \1\e[48;5;239;38;5;246m\2\1\e[0m\2" | ||
set vi-ins-mode-string "\1\e[1;48;5;109;38;5;237m\2 INS \1\e[48;5;239;38;5;109m\2\1\e[0m\2" | ||
# optionally: | ||
# switch to block cursor before executing a command | ||
set keymap vi-insert | ||
RETURN: "\e\n" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Fix colors | ||
set -g default-terminal "screen-256color" | ||
|
||
# Remap prefix | ||
unbind C-b | ||
set-option -g prefix C-a | ||
bind-key C-a send-prefix | ||
|
||
# Remap pane splits | ||
bind | split-window -h -c "#{pane_current_path}" # Open new pane in same directory | ||
bind - split-window -v -c "#{pane_current_path}" | ||
unbind '"' | ||
unbind % | ||
|
||
# Reload conf file | ||
bind r source-file ~/.tmux.conf | ||
|
||
|
||
# Pane Navigation | ||
bind -n M-Left select-pane -L | ||
bind -n M-Right select-pane -R | ||
bind -n M-Up select-pane -U | ||
bind -n M-Down select-pane -D | ||
|
||
|
||
# UI Theme | ||
# DESIGN TWEAKS | ||
|
||
# don't do anything when a 'bell' rings | ||
set -g visual-activity off | ||
set -g visual-bell off | ||
set -g visual-silence off | ||
setw -g monitor-activity off | ||
set -g bell-action none | ||
|
||
# clock mode | ||
setw -g clock-mode-colour colour1 | ||
|
||
# copy mode | ||
setw -g mode-style 'fg=colour1 bg=colour18 bold' | ||
|
||
# pane borders | ||
set -g pane-border-style 'fg=colour1' | ||
set -g pane-active-border-style 'fg=colour3' | ||
|
||
# statusbar | ||
set -g status-position bottom | ||
set -g status-justify left | ||
set -g status-style 'fg=colour1' | ||
set -g status-left '' | ||
set -g status-right '%Y-%m-%d %H:%M ' | ||
set -g status-right-length 50 | ||
set -g status-left-length 10 | ||
|
||
setw -g window-status-current-style 'fg=colour0 bg=colour1 bold' | ||
setw -g window-status-current-format ' #I #W #F ' | ||
|
||
setw -g window-status-style 'fg=colour1 dim' | ||
setw -g window-status-format ' #I #[fg=colour7]#W #[fg=colour1]#F ' | ||
|
||
setw -g window-status-bell-style 'fg=colour2 bg=colour1 bold' | ||
|
||
# messages | ||
set -g message-style 'fg=colour2 bg=colour0 bold' |
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
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
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