NNN alias, emacs go, GOPATH
This commit is contained in:
parent
98e945b031
commit
174a736ced
@ -1,6 +1,7 @@
|
|||||||
# This file contains fish universal variable definitions.
|
# This file contains fish universal variable definitions.
|
||||||
# VERSION: 3.0
|
# VERSION: 3.0
|
||||||
SETUVAR EDITOR:hx
|
SETUVAR EDITOR:hx
|
||||||
|
SETUVAR --export --path GOPATH:/home/joe/\x2elocal/share/go/
|
||||||
SETUVAR --export LC_COLLATE:C
|
SETUVAR --export LC_COLLATE:C
|
||||||
SETUVAR --export NNN_FIFO:/tmp/nnn\x2efifo
|
SETUVAR --export NNN_FIFO:/tmp/nnn\x2efifo
|
||||||
SETUVAR --export VISUAL:hx
|
SETUVAR --export VISUAL:hx
|
||||||
|
37
.config/fish/functions/n.fish
Normal file
37
.config/fish/functions/n.fish
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Rename this file to match the name of the function
|
||||||
|
# e.g. ~/.config/fish/functions/n.fish
|
||||||
|
# or, add the lines to the 'config.fish' file.
|
||||||
|
|
||||||
|
function n --wraps nnn --description 'support nnn quit and change directory'
|
||||||
|
# Block nesting of nnn in subshells
|
||||||
|
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
|
||||||
|
echo "nnn is already running"
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
|
||||||
|
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
|
||||||
|
# see. To cd on quit only on ^G, remove the "-x" from both lines below,
|
||||||
|
# without changing the paths.
|
||||||
|
if test -n "$XDG_CONFIG_HOME"
|
||||||
|
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
|
||||||
|
else
|
||||||
|
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
||||||
|
# stty start undef
|
||||||
|
# stty stop undef
|
||||||
|
# stty lwrap undef
|
||||||
|
# stty lnext undef
|
||||||
|
|
||||||
|
# The command function allows one to alias this function to `nnn` without
|
||||||
|
# making an infinitely recursive alias
|
||||||
|
set -x NNN_PLUG 'p:preview-tui'
|
||||||
|
command nnn -ed -P p $argv
|
||||||
|
|
||||||
|
if test -e $NNN_TMPFILE
|
||||||
|
source $NNN_TMPFILE
|
||||||
|
rm $NNN_TMPFILE
|
||||||
|
end
|
||||||
|
end
|
@ -2,8 +2,8 @@ include /home/joe/.config/kitty/theme.conf
|
|||||||
|
|
||||||
font_size 13.0
|
font_size 13.0
|
||||||
|
|
||||||
adjust_line_height 5
|
adjust_line_height 4
|
||||||
adjust_column_width 1
|
adjust_column_width 0
|
||||||
|
|
||||||
window_resize_step_cells 3
|
window_resize_step_cells 3
|
||||||
window_resize_step_lines 3
|
window_resize_step_lines 3
|
||||||
|
@ -707,7 +707,10 @@ targets."
|
|||||||
(add-hook 'shell-mode (lambda () (setq-local global-hl-line-mode nil)))
|
(add-hook 'shell-mode (lambda () (setq-local global-hl-line-mode nil)))
|
||||||
(setq shell-kill-buffer-on-exit t)
|
(setq shell-kill-buffer-on-exit t)
|
||||||
|
|
||||||
(add-hook 'vterm-mode-hook (lambda () (setq-local global-hl-line-mode nil)))
|
(add-hook 'vterm-mode-hook (lambda ()
|
||||||
|
(define-key vterm-mode-map (kbd "C-c C-x") #'vterm-send-C-x)
|
||||||
|
(setq-local global-hl-line-mode nil)))
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
We need this require so we can call `vterm--internal in the joe/vterm-here function, but that slows
|
We need this require so we can call `vterm--internal in the joe/vterm-here function, but that slows
|
||||||
@ -864,7 +867,7 @@ Emacs is an great operating system, if only it had a good text editor...
|
|||||||
(meow-global-mode t)
|
(meow-global-mode t)
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Boon
|
*** Boon
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp
|
||||||
(straight-use-package 'boon)
|
(straight-use-package 'boon)
|
||||||
(require 'boon-qwerty)
|
(require 'boon-qwerty)
|
||||||
(boon-mode)
|
(boon-mode)
|
||||||
@ -877,10 +880,20 @@ Emacs is an great operating system, if only it had a good text editor...
|
|||||||
(define-key boon-moves-map ";" '("hop" . avy-goto-word-1))
|
(define-key boon-moves-map ";" '("hop" . avy-goto-word-1))
|
||||||
(define-key boon-command-map (kbd "C-k") 'scroll-down-line)
|
(define-key boon-command-map (kbd "C-k") 'scroll-down-line)
|
||||||
(define-key boon-command-map (kbd "C-j") 'scroll-up-line)
|
(define-key boon-command-map (kbd "C-j") 'scroll-up-line)
|
||||||
|
(define-key boon-command-map (kbd "C-d") 'joe/smooth-scroll-half-page-down)
|
||||||
|
(define-key boon-command-map (kbd "C-u") 'joe/smooth-scroll-half-page-up)
|
||||||
(define-key boon-moves-map "H" 'backward-paragraph)
|
(define-key boon-moves-map "H" 'backward-paragraph)
|
||||||
(define-key boon-moves-map "L" 'forward-paragraph)
|
(define-key boon-moves-map "L" 'forward-paragraph)
|
||||||
(define-key boon-moves-map "K" 'boon-smarter-upward)
|
(define-key boon-moves-map "K" 'boon-smarter-upward)
|
||||||
(define-key boon-moves-map "J" 'boon-smarter-downward)
|
(define-key boon-moves-map "J" 'boon-smarter-downward)
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Because boon provides the x mode map, emacs bindings that keep tempo no longer do, so reverse them
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(global-set-key (kbd "C-x s") 'save-buffer)
|
||||||
|
(global-set-key (kbd "C-x C-s") 'save-some-buffers)
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Kakoune.el
|
*** Kakoune.el
|
||||||
|
|
||||||
@ -929,6 +942,7 @@ Emacs is an great operating system, if only it had a good text editor...
|
|||||||
(straight-use-package 'lsp-mode)
|
(straight-use-package 'lsp-mode)
|
||||||
|
|
||||||
(setq lsp-keymap-prefix "C-c c")
|
(setq lsp-keymap-prefix "C-c c")
|
||||||
|
(lsp-enable-which-key-integration t)
|
||||||
;; (require 'lsp)
|
;; (require 'lsp)
|
||||||
;; (straight-use-package 'eglot)
|
;; (straight-use-package 'eglot)
|
||||||
|
|
||||||
@ -1046,6 +1060,12 @@ it doesn't close it.
|
|||||||
(global-set-key (kbd "C-c e n") #'flymake-goto-next-error)
|
(global-set-key (kbd "C-c e n") #'flymake-goto-next-error)
|
||||||
(global-set-key (kbd "C-c e p") #'flymake-goto-prev-error)
|
(global-set-key (kbd "C-c e p") #'flymake-goto-prev-error)
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
*** Go
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(straight-use-package 'go-mode)
|
||||||
|
;; (straight-use-package 'go-imports)
|
||||||
#+end_src
|
#+end_src
|
||||||
** Magit
|
** Magit
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ set highlightedyank
|
|||||||
" vnoremap N :action FindPrevious<CR>
|
" vnoremap N :action FindPrevious<CR>
|
||||||
" nnoremap * :action FindWordAtCaret<CR>
|
" nnoremap * :action FindWordAtCaret<CR>
|
||||||
" nnoremap # :action FindWordAtCaret<CR>
|
" nnoremap # :action FindWordAtCaret<CR>
|
||||||
nnoremap <C-[> <esc>
|
|
||||||
|
|
||||||
nnoremap <Leader>f :action FindInPath<CR>
|
nnoremap <Leader>f :action FindInPath<CR>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user