mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 12:15:38 +00:00
misc vim and fish
This commit is contained in:
parent
25f9c023f8
commit
b09c6c6f90
@ -26,13 +26,16 @@ SETUVAR _fish_abbr_gs:git\x20status
|
||||
SETUVAR _fish_abbr_gu:git\x20pull
|
||||
SETUVAR _fish_abbr_h:http\x20\x2dFh\x20\x2d\x2dall
|
||||
SETUVAR _fish_abbr_hosts:sudo\x20vim\x20/etc/hosts
|
||||
SETUVAR _fish_abbr_k:kubectl
|
||||
SETUVAR _fish_abbr_l:ls
|
||||
SETUVAR _fish_abbr_la:ls\x20\x2dalhF
|
||||
SETUVAR _fish_abbr_lh:ls\x20\x2dlh
|
||||
SETUVAR _fish_abbr_ll:ls\x20\x2dalhF
|
||||
SETUVAR _fish_abbr_misty:cd\x20\x24PROJ/misty
|
||||
SETUVAR _fish_abbr_nodes:kubectl\x20get\x20nodes
|
||||
SETUVAR _fish_abbr_oldcat:cat
|
||||
SETUVAR _fish_abbr_p:python
|
||||
SETUVAR _fish_abbr_pods:kubectl\x20get\x20pods\x20\x2dA
|
||||
SETUVAR _fish_abbr_public_2D_key:ssh\x2dkeygen\x20\x2dy\x20\x2df\x20\x7e/\x2essh/id_rsa\x20\x3e\x20\x7e/\x2essh/id_rsa\x2epub
|
||||
SETUVAR _fish_abbr_py:python
|
||||
SETUVAR _fish_abbr_runbootstrap:\x24DOTS/scripts/bootstrap
|
||||
|
@ -63,6 +63,11 @@ function aliases --description 'All aliases'
|
||||
# Terraform
|
||||
abbr -a te 'terraform'
|
||||
|
||||
# Kubernetes
|
||||
abbr -a k 'kubectl'
|
||||
abbr -a pods 'kubectl get pods -A'
|
||||
abbr -a nodes 'kubectl get nodes'
|
||||
|
||||
# Python
|
||||
abbr py 'python'
|
||||
alias domisty='cd $PROJ/misty && ./buildrun.sh'
|
||||
|
@ -1,7 +1,19 @@
|
||||
#!/usr/local/bin/fish
|
||||
|
||||
function mactools
|
||||
|
||||
function copy --description 'Copy file contents into clipboard'
|
||||
cat $argv | pbcopy
|
||||
end
|
||||
|
||||
function brewsearch --description "Install brew plugins"
|
||||
set -l inst (brew search | eval "fzf $FZF_DEFAULT_OPTS -m --header='[brew:install]'")
|
||||
|
||||
if not test (count $inst) = 0
|
||||
for prog in $inst
|
||||
brew install "$prog"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -10,7 +10,8 @@ function notes --description "Notes functions"
|
||||
else
|
||||
set yesterday (date -jv "-1d" +"%Y-%m-%d_%a")
|
||||
set tomorrow (date -jv "+1d" +"%Y-%m-%d_%a")
|
||||
printf "[[journal/$yesterday|Previous]] - [[calendar|Index]] - [[journal/$tomorrow|Next]]\n\n---\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal
|
||||
set weather (curl "https://wttr.in/?format=1")
|
||||
printf "[[journal/$yesterday|Previous]] - [[calendar|Index]] - [[journal/$tomorrow|Next]]\n\n---\n\n$weather\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal
|
||||
echo "New journal added."
|
||||
end
|
||||
end
|
||||
@ -23,7 +24,8 @@ function notes --description "Notes functions"
|
||||
else
|
||||
set yesterday (date -jv "-1d" +"%Y-%m-%d_%a")
|
||||
set tomorrow (date -jv "+1d" +"%Y-%m-%d_%a")
|
||||
printf "[[journal/$yesterday|Previous]] - [[calendar|Index]] - [[journal/$tomorrow|Next]]\n\n---\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal
|
||||
set weather (curl "https://wttr.in/?format=1")
|
||||
printf "[[journal/$yesterday|Previous]] - [[calendar|Index]] - [[journal/$tomorrow|Next]]\n\n---\n\n$weather\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal
|
||||
echo "New journal added."
|
||||
vim $today_journal
|
||||
end
|
||||
|
@ -9,7 +9,7 @@ brew "tmux"
|
||||
brew "autojump"
|
||||
|
||||
# Shell Completion
|
||||
brew "tldr"
|
||||
brew "tealdeer"
|
||||
brew "zsh-syntax-highlighting"
|
||||
brew "zsh-autosuggestions"
|
||||
|
||||
@ -59,6 +59,10 @@ tap "nmasur/repo"
|
||||
brew "nmasur/repo/drips"
|
||||
brew "nmasur/repo/update-ssh-config"
|
||||
|
||||
# Try them out
|
||||
tap "cjbassi/ytop"
|
||||
brew "cjbassi/ytop/ytop"
|
||||
|
||||
# Not Installed
|
||||
# git -- already installed
|
||||
# hub -- github commands
|
||||
|
@ -10,7 +10,13 @@ Plug 'Raimondi/delimitMate' " Auto-close parentheses
|
||||
Plug 'tpope/vim-commentary' " Use gc or gcc to comment
|
||||
Plug 'hashivim/vim-terraform' " Terraform HCL syntax
|
||||
Plug 'vimwiki/vimwiki' " Wiki System
|
||||
Plug 'jreybert/vimagit' " Git GUI
|
||||
Plug 'jreybert/vimagit' " Git 'gui' buffer
|
||||
Plug 'airblade/vim-gitgutter' " Git next to line numbers
|
||||
Plug 'tpope/vim-fugitive' " Other git commands
|
||||
Plug 'machakann/vim-highlightedyank' " Highlight text when copied
|
||||
Plug 'itchyny/lightline.vim' " Status bar
|
||||
Plug 'shinchu/lightline-gruvbox.vim' " Colors for status bar
|
||||
Plug 'tpope/vim-vinegar' " Fixes netrw file explorer
|
||||
|
||||
call plug#end()
|
||||
|
||||
@ -29,7 +35,6 @@ set softtabstop=4 " Amount to shift with TAB key
|
||||
set ignorecase " Ignore case when searching
|
||||
set smartcase " Check case when using capitals in search
|
||||
set incsearch " Search while typing
|
||||
set pastetoggle=<F3>
|
||||
set visualbell " No sounds
|
||||
set scrolljump=1 " Scroll more than one line (or 1 line)
|
||||
set scrolloff=3 " Margin of lines when scrolling
|
||||
@ -66,7 +71,7 @@ endif
|
||||
map <Space> <Leader>
|
||||
|
||||
" Jump to text in this directory
|
||||
nnoremap <Leader>t :Rg<CR>
|
||||
nnoremap <Leader>/ :Rg<CR>
|
||||
|
||||
" Open file in this directory
|
||||
nnoremap <Leader>f :Files<cr>
|
||||
@ -77,6 +82,21 @@ nnoremap <Leader>b :Buffers<cr>
|
||||
" Jump to text in this file
|
||||
nnoremap <Leader>s :BLines<cr>
|
||||
|
||||
" Start Magit buffer
|
||||
nnoremap <Leader>g :Magit<cr>
|
||||
|
||||
" Toggle Git gutter (by line numbers)
|
||||
nnoremap <Leader>` :GitGutterToggle<cr>
|
||||
|
||||
" Git push
|
||||
nnoremap <Leader>p :Git push<cr>
|
||||
|
||||
" Close all other splits
|
||||
nnoremap <Leader>m :only<cr>
|
||||
|
||||
" Open file tree
|
||||
nnoremap <Leader>t :Vexplore<cr>
|
||||
|
||||
" Mouse interaction / scrolling
|
||||
set mouse=nv
|
||||
|
||||
@ -84,6 +104,21 @@ set mouse=nv
|
||||
let &titlestring = @%
|
||||
set title
|
||||
|
||||
" Make whitespace pretty
|
||||
" if &listchars ==# 'eol:$'
|
||||
" set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
|
||||
" endif
|
||||
|
||||
" Built-in explorer plugin
|
||||
let g:netrw_liststyle = 3 " Change style to 'tree' view
|
||||
let g:netrw_banner = 0 " Remove useless banner
|
||||
let g:netrw_winsize = 15 " Explore window takes % of page
|
||||
let g:netrw_browse_split = 4 " Open in previous window
|
||||
let g:netrw_altv = 1 " idk
|
||||
|
||||
" Gitgutter plugin
|
||||
let g:gitgutter_enabled = 0 " Disable on start
|
||||
|
||||
" Terraform Plugin
|
||||
let g:terraform_fmt_on_save=1
|
||||
|
||||
@ -91,3 +126,22 @@ let g:terraform_fmt_on_save=1
|
||||
let g:vimwiki_list = [{'path': '~/Documents/notes/',
|
||||
\ 'syntax': 'markdown', 'ext': '.md'}]
|
||||
|
||||
function! GitStatus()
|
||||
let [a,m,r] = GitGutterGetHunkSummary()
|
||||
return printf('+%d ~%d -%d', a, m, r)
|
||||
endfunction
|
||||
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'jellybeans',
|
||||
\ 'active': {
|
||||
\ 'right': [[ 'lineinfo' ]],
|
||||
\ 'left': [[ 'mode', 'paste' ],
|
||||
\ [ 'readonly', 'relativepath', 'gitbranch', 'modified' ]]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ 'gitbranch': 'fugitive#head'
|
||||
\ }
|
||||
\ }
|
||||
" let g:lightline.colorscheme = 'gruvbox'
|
||||
|
||||
" set statusline+=%{GitStatus()}
|
||||
|
@ -0,0 +1,8 @@
|
||||
boto3==1.10.49
|
||||
botocore==1.13.49
|
||||
docutils==0.15.2
|
||||
jmespath==0.9.4
|
||||
python-dateutil==2.8.1
|
||||
s3transfer==0.2.1
|
||||
six==1.13.0
|
||||
urllib3==1.25.7
|
Loading…
Reference in New Issue
Block a user