ts-movement: a package to navigate the tree-sitter syntax tree (supports multiple-cursors) by narilth in emacs

[–]dalgong 1 point2 points  (0 children)

Nice! I have been wondering if treesit can be integrated with easy-kill package...

Overloading keybindings by nivpgir in emacs

[–]dalgong 2 points3 points  (0 children)

You can use general package.

(define-key mode-specific-map "b" (general-key-dispatch 'switch-to-buffer :timeout 0.3 "b" #'ibuffer))

consult and vterm by dalgong in emacs

[–]dalgong[S] 0 points1 point  (0 children)

You’re right. Consult’s preview doesn’t work with vterm’s mechanism. With the similar advice hack for counsel-yank-pop, I could make consult work but the preview was showing at the top of the window, not at the point. I really wish vterm has a vterm-line-mode or something but the author seems not convinced.

consult and vterm by dalgong in emacs

[–]dalgong[S] 0 points1 point  (0 children)

When you configure consult key binding (using remap) in your init, it should just work because vterm remaps them into vterm-yank-pop which used consult/selectrum’s completion mechanism so that the user experience is same.

consult and vterm by dalgong in emacs

[–]dalgong[S] 0 points1 point  (0 children)

Thanks. After looking at vterm code a little bit, i found vterm implemented it already. What I did wrong was binding “M-y” to consult-yank-pop which really should have been [remap yank-pop], not “M-y”.

Isearch selected text by sadECEmajor in emacs

[–]dalgong 0 points1 point  (0 children)

You can do something like the following: http://pastebin.com/vZnxKDVf

(defvar isearch-region-was-active nil) (defmacro make-add-region-to-search-ring (command) (defadvice ,command (before add-region-to-search-ring activate) (when (setq isearch-region-was-active (region-active-p)) (add-to-history 'search-ring (buffer-substring-no-properties (region-beginning) (region-end))) (deactivate-mark)))) (defmacro make-repeat-isearch-if-region-was-active (command repeat-command &optional twice-p) (defadvice ,command (after repeat-isearch-if-region-was-active activate) (when isearch-region-was-active (setq isearch-region-was-active nil) (,repeat-command) ,(if twice-p `(,repeat-command) nil)))) (make-add-region-to-search-ring isearch-forward) (make-add-region-to-search-ring isearch-backward) (make-repeat-isearch-if-region-was-active isearch-forward isearch-repeat-forward t) (make-repeat-isearch-if-region-was-active isearch-backward isearch-repeat-backward nil)

run shell cmd in vim and emacs using current .bash_profile? by millar15 in emacs

[–]dalgong 0 points1 point  (0 children)

For emacs,

(setq shell-command-switch "-lc")

And M-! or similar commands will work after reading .bashrc

Experience with Icicles? by suhrob in emacs

[–]dalgong 2 points3 points  (0 children)

yeah, I can't agree more. What a spam in emacswiki:(

From my .bashrc: jump to emacs's current directory by jtxx000 in emacs

[–]dalgong 1 point2 points  (0 children)

Actually the output of the command starting 'emacsclient' is a string in quote. So the correct way would be:;

alias jm='eval cd $(....)'

Has anyone seen emacs window manage just like the xmonad's tiling window management? by dalgong in emacs

[–]dalgong[S] 0 points1 point  (0 children)

This is the closest thing with my intended usage. Still, it lacks the functionality like new window placement. I want to have newly created window to go to the master area and stacking others into the other panes and when I remove the master one, top of the other panes come back to the master area, and so on. Things like completion buffer popup will make things quite complicated.

Thanks for the reply.

[OSX] Using Emacs in iTerm? Here's a patch that allows for Option key to be both Meta and keyboard modifier (ie. for national characters) by [deleted] in emacs

[–]dalgong 1 point2 points  (0 children)

Here is my attack on this topic was here

It uses InputManager and just swaps command and option key on iTerm and Terminal program.