summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitsuo Tokumori <[email protected]>2022-10-14 14:36:19 -0500
committerMitsuo Tokumori <[email protected]>2022-10-14 14:36:19 -0500
commit5f51ce5761d0f1d5b1fe2129c2e97a044fca8710 (patch)
treed3865a4f323cd8294ee75ef5267b425760c67b87
parent8e5dd31cfaa46392bea9ebbaa660ff1231b25bc8 (diff)
downloaddotfiles-5f51ce5761d0f1d5b1fe2129c2e97a044fca8710.tar.gz
dotfiles-5f51ce5761d0f1d5b1fe2129c2e97a044fca8710.tar.bz2
dotfiles-5f51ce5761d0f1d5b1fe2129c2e97a044fca8710.zip
Add shortcuts to Vim (make & comment lines)
-rw-r--r--bash/bash_aliases3
-rw-r--r--bash/bashrc3
-rw-r--r--vim/fun.vim3
-rw-r--r--vim/vimrc4
4 files changed, 10 insertions, 3 deletions
diff --git a/bash/bash_aliases b/bash/bash_aliases
index 9131407..e87e633 100644
--- a/bash/bash_aliases
+++ b/bash/bash_aliases
@@ -23,7 +23,10 @@ alias lla='ll -A'
alias gcc='gcc -g -std=c99 -lm'
alias ed='ed -p "* "'
+# https://missing.csail.mit.edu/2020/version-control/
alias gitlogpretty='git log --all --graph --decorate --abbrev-commit'
+# https://stackoverflow.com/a/15606995/7498073
+alias gitshowtrackedfiles='git ls-tree -r master --name-only'
# Precautionary
diff --git a/bash/bashrc b/bash/bashrc
index 3b74c60..f38d7e1 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -110,6 +110,9 @@ if [ -z $DESKTOP_SESSION ]; then
setfont LatGrkCyr-8x16
fi
+# nvm
+source /usr/share/nvm/init-nvm.sh
+
# Optional
diff --git a/vim/fun.vim b/vim/fun.vim
index 25b71ca..56cae24 100644
--- a/vim/fun.vim
+++ b/vim/fun.vim
@@ -51,7 +51,8 @@ command Md2Pdfms call Md2Pdfms()
function! Md2Html ( )
exe ":w"
- exe ":! pandoc -s --toc -H ~/mahcode/markdown/pandoc/pandoc_style.html --highlight-style tango -o \"" . expand("%:r") . ".html\"" . " \"" . expand("%") . "\""
+ "exe ":! pandoc -s --toc -H ~/mahcode/markdown/pandoc/pandoc_style.html --highlight-style tango -o \"" . expand("%:r") . ".html\"" . " \"" . expand("%") . "\""
+ exe ":! pandoc --highlight-style tango -o \"" . expand("%:r") . ".html\"" . " \"" . expand("%") . "\""
echo "html saved as " . expand("%:p:r") . ".html"
endfunction
diff --git a/vim/vimrc b/vim/vimrc
index 33aed79..2c59186 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -153,7 +153,7 @@ map <F8> :tabn<CR>
" C/C++ Programming:
-map <F6> :w<CR>:make<CR>
+map <F6> :w<CR>:!clear && make<CR>
"map <F10> :!./%:r<CR>
"map <F10> :!./a.out<CR>
@@ -209,7 +209,7 @@ nnoremap <C-t> :NERDTreeToggle<CR>
" - https://stackoverflow.com/a/9051932/7498073
au FileType haskell,vhdl,ada let b:comment_leader = '-- '
au FileType vim let b:comment_leader = '" '
-au FileType c,cpp,java let b:comment_leader = '// '
+au FileType c,cpp,java,asciidoc let b:comment_leader = '// '
au FileType sh,make let b:comment_leader = '# '
au FileType tex let b:comment_leader = '% '
" That c_CTRL-R_= thingy enters the "expression register". And that \V