dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@getsh.org:dotfiles.git
Log | Files | Refs

commit c7f9d1df6325165af017b968d9be45cffd0182e9
parent 0e9dda02679636d7836fa8f204108ae047df7ffb
Author: Bharatvaj <bharatvaj@yahoo.com>
Date:   Thu, 31 Mar 2022 14:52:17 +0530

Add useful keybinding for vim and others

Add git alias for commit and config

VIM
---
* Y is remapped to y$
* Add ToggleList and map to <leader>tl
* Add keymap for copen and grep
* set exrc is enable back, as it useful for setting up projects

BASH
----
* Add PS1 for bash from zsh

Diffstat:
M.config/bash/bashrc | 5+++++
M.config/git/config | 2++
M.config/sh/aliases | 1+
M.config/vim/keybindings/keybindings.vim | 13+++++++++++++
M.config/vim/vimrc | 4+++-
M.profile | 2+-
6 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/.config/bash/bashrc b/.config/bash/bashrc @@ -4,4 +4,9 @@ PATH_EXPORTS=( "${ESSENTIAL_PATH_EXPORTS[@]}" "${OTHER_PATH_EXPORTS[@]}" ) export PATH="${PATH}:${PATH_EXPORTS[*]}" +[ -f ${XDG_CONFIG_HOME}/bash/autojump.bash ] && ${XDG_CONFIG_HOME}/bash/autojump.bash + +PS1='\w ∆ ' + + [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh diff --git a/.config/git/config b/.config/git/config @@ -4,7 +4,9 @@ ba = branch --all c = commit cm = commit --message + ca = commit --amend co = checkout + con = config d = diff ds = diff --staged ld = log --pretty=format:"%h %ad %s" --date=short --all diff --git a/.config/sh/aliases b/.config/sh/aliases @@ -21,3 +21,4 @@ mich ifconfig && alias lip="ifconfig | grep -w inet | cut -d ' ' -f2" mich curl && alias gip="curl ifconfig.co" alias '?d'='sr duckduckgo' +alias l=lfcd diff --git a/.config/vim/keybindings/keybindings.vim b/.config/vim/keybindings/keybindings.vim @@ -4,6 +4,19 @@ nnoremap <leader>p :Rg<cr> nnoremap <leader>f :find nnoremap <Leader>l :ls<CR>:b<space> nmap <leader>F :GFiles<cr> +nnoremap <leader>co :copen<cr> +nnoremap <leader>g :grep +nnoremap Y y$ + +function! ToggleList() + if &list == "nolist" + set list + else + set nolist + endif +endfunction + +nnoremap <leader>tl :call ToggleList()<CR> " Buffer Creation nnoremap <Leader>v :vsplit<enter> diff --git a/.config/vim/vimrc b/.config/vim/vimrc @@ -28,7 +28,7 @@ augroup END set mouse= set nocursorline syntax on -set noexrc +set exrc set scrolloff=8 " Turn backup off set nobackup @@ -89,3 +89,5 @@ if has("win32") set shellxquote= endif endif + +set path+=** diff --git a/.profile b/.profile @@ -59,7 +59,7 @@ export GEM_SPEC_CACHE="$XDG_CACHE_HOME"/gem HISTTIMEFORMAT="%F %T " # Local executables -export PATH=${PATH}:${HOME}./local/bin:${XDG_DATA_HOME}/npm/bin +export PATH=${PATH}:${HOME}/.local/bin:${XDG_DATA_HOME}/npm/bin:${XDG_DATA_HOME}/.cargo/bin chance() { # Hit or miss