Skip to content

Instantly share code, notes, and snippets.

@ram535
ram535 / dired.el
Last active August 12, 2021 04:30
Dired configuration. This configuration uses straight.el, general.el, evil.
(use-package dired
:straight (:type built-in)
:hook ((dired-mode . hl-line-mode)
(dired-mode . dired-hide-details-mode))
:custom
(dired-recursive-copies 'always)
(dired-recursive-deletes 'always)
;;use to copy to the next buffer visible
(dired-dwim-target t)
;; Auto refresh Dired, but be quiet about it
@ram535
ram535 / vterm-completion.el
Last active July 29, 2022 14:21
vterm completion for files, directories, command history and programs names
(use-package vterm
:config
(defun get-full-list ()
(let ((program-list (split-string (shell-command-to-string "compgen -c") "\n" t ))
(file-directory-list (split-string (shell-command-to-string "compgen -f") "\n" t ))
(history-list (with-temp-buffer
(insert-file-contents "~/.bash_history")
(split-string (buffer-string) "\n" t))))
(delete-dups (append program-list file-directory-list history-list))))
@ram535
ram535 / gist:b1b7af6cd7769ec0481eb2eed549ea23
Last active February 2, 2023 12:25
Reuse the same terminal in neovim.
" With this function you can reuse the same terminal in neovim.
" You can toggle the terminal and also send a command to the same terminal.
let s:monkey_terminal_window = -1
let s:monkey_terminal_buffer = -1
let s:monkey_terminal_job_id = -1
function! MonkeyTerminalOpen()
" Check if buffer exists, if not create a window and a buffer
if !bufexists(s:monkey_terminal_buffer)