Better venv aliase and emacs config updates
This commit is contained in:
@@ -19,7 +19,6 @@ alias ls='ls --color=tty'
|
|||||||
alias lsa='ls -lah'
|
alias lsa='ls -lah'
|
||||||
alias md='mkdir -p'
|
alias md='mkdir -p'
|
||||||
alias rd=rmdir
|
alias rd=rmdir
|
||||||
alias venv='source .env/bin/activate'
|
|
||||||
alias which-command=whence
|
alias which-command=whence
|
||||||
alias copy="xclip -selection clipboard"
|
alias copy="xclip -selection clipboard"
|
||||||
alias mkcdir='f() { md $1; cd $1 }; f'
|
alias mkcdir='f() { md $1; cd $1 }; f'
|
||||||
@@ -36,4 +35,26 @@ alias mssh="mosh --ssh='kitten ssh'"
|
|||||||
alias mussh="mosh --ssh='kitten ssh -o StrictHostKeyChecking=no'"
|
alias mussh="mosh --ssh='kitten ssh -o StrictHostKeyChecking=no'"
|
||||||
alias gf2="/usr/bin/gf2 &> /dev/null &"
|
alias gf2="/usr/bin/gf2 &> /dev/null &"
|
||||||
alias qemu-monitor="telnet 127.0.0.1 7777"
|
alias qemu-monitor="telnet 127.0.0.1 7777"
|
||||||
alias sudo="/usr/bin/sudo"
|
alias sudo="/usr/bin/sudo"
|
||||||
|
|
||||||
|
function venv () {
|
||||||
|
VENV_DIR=""
|
||||||
|
|
||||||
|
if [ -d .env ] ; then
|
||||||
|
VENV_DIR=".env"
|
||||||
|
elif [ -d .venv ]; then
|
||||||
|
VENV_DIR=".venv"
|
||||||
|
elif [ -d env ] ; then
|
||||||
|
VENV_DIR="env"
|
||||||
|
elif [ -d venv ] ; then
|
||||||
|
VENV_DIR="venv"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$VENV_DIR" ]]; then
|
||||||
|
echo "Error: no virtual venv directory found"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Activating $VENV_DIR"
|
||||||
|
source "${VENV_DIR}/bin/activate"
|
||||||
|
}
|
||||||
|
|||||||
@@ -176,3 +176,11 @@
|
|||||||
(setq treesit-language-source-alist
|
(setq treesit-language-source-alist
|
||||||
'((typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src" nil nil)
|
'((typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src" nil nil)
|
||||||
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src" nil nil))))
|
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src" nil nil))))
|
||||||
|
|
||||||
|
;; Buffer display name
|
||||||
|
(with-eval-after-load 'uniquify
|
||||||
|
(setq uniquify-buffer-name-style 'post-forward-angle-brackets))
|
||||||
|
|
||||||
|
;; Config ido
|
||||||
|
(with-eval-after-load 'ido
|
||||||
|
(setq ido-max-window-height 5))
|
||||||
|
|||||||
@@ -40,17 +40,17 @@
|
|||||||
minimap ; show a map of the code on the side
|
minimap ; show a map of the code on the side
|
||||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||||
;;nav-flash ; blink cursor line after big motions
|
;;nav-flash ; blink cursor line after big motions
|
||||||
neotree ; a project drawer, like NERDTree for vim
|
;;neotree ; a project drawer, like NERDTree for vim
|
||||||
ophints ; highlight the region an operation acts on
|
ophints ; highlight the region an operation acts on
|
||||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||||
;;smooth-scroll ; So smooth you won't believe it's not butter
|
;;smooth-scroll ; So smooth you won't believe it's not butter
|
||||||
;;tabs ; a tab bar for Emacs
|
;;tabs ; a tab bar for Emacs
|
||||||
;;treemacs ; a project drawer, like neotree but cooler
|
treemacs ; a project drawer, like neotree but cooler
|
||||||
;;unicode ; extended unicode support for various languages
|
;;unicode ; extended unicode support for various languages
|
||||||
(vc-gutter +pretty) ; vcs diff in the fringe
|
(vc-gutter +pretty) ; vcs diff in the fringe
|
||||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||||
;;window-select ; visually switch windows
|
;;window-select ; visually switch windows
|
||||||
workspaces ; tab emulation, persistence & separate workspaces
|
;;workspaces ; tab emulation, persistence & separate workspaces
|
||||||
;;zen ; distraction-free coding or writing
|
;;zen ; distraction-free coding or writing
|
||||||
|
|
||||||
:editor
|
:editor
|
||||||
|
|||||||
Reference in New Issue
Block a user