Skip to content

Commit

Permalink
Merge pull request #14 from DMcP89/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
DMcP89 authored Jun 8, 2024
2 parents b104950 + c07166b commit 852bbec
Show file tree
Hide file tree
Showing 7 changed files with 157 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,5 @@ export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
export PATH=$PATH:/$HOME/.cargo/bin

complete -C /usr/bin/terraform terraform

alias tmux="TERM=xterm-256color tmux"
75 changes: 75 additions & 0 deletions .config/nvim/init.lua
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>')


8 changes: 8 additions & 0 deletions .inputrc
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"
64 changes: 64 additions & 0 deletions .tmux.conf
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'
5 changes: 4 additions & 1 deletion .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Plugin 'ap/vim-buftabline'
Plugin 'pylint.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'fatih/vim-go'
Plugin 'junegunn/fzf'

Bundle 'powerline/powerline', {'rtp': 'powerline/bindings/vim/'}

Expand All @@ -41,6 +42,8 @@ map <C-n> :NERDTreeToggle<CR>
" Open files in new tab
let NERDTreeMapOpenInTab='\r'

" FZF
nnoremap <Leader>f :FZF<CR>
" Colors
colorscheme badwolf
Expand Down Expand Up @@ -81,7 +84,7 @@ nnoremap <C-x> :bd<CR>
set laststatus=2

" Search and replace
nnoremap <Leader>s :%s/\<<C-r><C-w>\>//g<Left><Left>
nnoremap <Leader>s :%s/<C-r><C-w>//g<Left><Left>
" Save from insert mode
inoremap <F3> <c-o>:w<cr>
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ copy-files:
@cp $(HOME)/.gitconfig $(CURDIR)
@cp $(HOME)/.vimrc $(CURDIR)
@cp $(HOME)/.profile $(CURDIR)
@cp $(HOME)/.tmux.conf $(CURDIR)
@cp -r $(HOME)/.vim/colors $(CURDIR)/.vim/
@cp -r $(HOME)/.config $(CURDIR)
# @cp -r $(HOME)/.config $(CURDIR)


install-ansible:
Expand Down
2 changes: 2 additions & 0 deletions ansible-playbooks/go-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- name: gantsign.golang
vars:
golang_install_dir: /usr/local/go
golang_version: '1.22.2'
golang_redis_sha256sum: '5901c52b7a78002aeff14a21f93e0f064f74ce1360fce51c6ee68cd471216a17'

tasks:
- name: install tinycare-tui
Expand Down

0 comments on commit 852bbec

Please sign in to comment.