Advertisement
pharmokan

emacs

Apr 27th, 2020
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. starting with letter bracket quote dot comma
  2.  
  3. run -> window buffer right show
  4. refreshing txt file node cmd watch
  5. live console log window
  6. ;;=====================
  7. delete q b ?
  8. change q b ?
  9. insert q b ?
  10. ;;=====================
  11. remove brackets?
  12. remove quotes?
  13. ;;=====================
  14. line
  15. block
  16. line in between
  17. if(x) {
  18. here highlight
  19. }
  20.  
  21. ;;=====================
  22. mark previous where cursor was
  23. last edited point
  24. ;;=====================
  25. save everything killed cut paste buffer file history
  26. fzf rg
  27. ;;=====================
  28. search forward ([{'"
  29. expand region hydra +/-
  30. continue search forward or search backward hydra n/p | [/]
  31. ;;=====================
  32. hydra
  33. activator key
  34. read (letter)
  35. highlight matches next back followed by bracket preceded by comma/dot et...
  36. ;;=====================
  37. https://gist.github.com/fukamachi/304391
  38. ;;=====================
  39. func()
  40. a.indexOf(b[i])
  41. [1,2,3,4,5]
  42. {a:1,b:2,c:3}
  43. ;;=====================
  44. https://emacs.stackexchange.com/questions/21115/looping-through-re-seach-forward-gives-error
  45. ;;=====================
  46. https://gist.github.com/mrbig033/ad4a9787e159e61afd519d5208a8a394
  47. ;;=====================
  48. (setq message-kill-buffer-on-exit t)
  49. ;;=====================
  50. (use-package goto-chg
  51. :config
  52. (global-set-key (kbd "C-o") 'goto-last-change)
  53. (global-set-key (kbd "M-o") 'goto-last-change-reverse))
  54. ;;=====================
  55. (defun custom-find-func (fnName regex-string)
  56. "Finds custom things inside brackets parenthesis"
  57. (interactive)
  58. (when (funcall (intern fnName) regex-string nil t)
  59. )
  60. )
  61.  
  62. (global-set-key (kbd "<C-f3>") (lambda () (interactive) (custom-find-func "re-search-forward""(\\(.*?\\))" )))
  63. (global-set-key (kbd "<C-f1>") (lambda () (interactive) (custom-find-func "re-search-forward""\\[\\(.+\\)\\]" )))
  64. (global-set-key (kbd "<C-f2>") 'eval-buffer)
  65. ;;=====================
  66. ;;working 04/29/2020 -- dan inside quotes and brackets forward search only
  67. ;;=====================
  68. (defun jump-forward-and-highlight-inside-quotes ()
  69. "highlight encounters in-between single and double quotes"
  70. (interactive)
  71. (deactivate-mark)
  72. (forward-char 2)
  73. (when (re-search-forward "'\\|\"" nil t)
  74. (er/expand-region 1)
  75. (exchange-point-and-mark)
  76. )
  77. )
  78. (defun jump-forward-and-highlight-inside-pairs ()
  79. "Bounce from one paren to the matching paren."
  80. (interactive)
  81. (when (re-search-forward "\\[\\|\{\\|\(" nil t)
  82. (er/mark-inside-pairs)
  83. (exchange-point-and-mark)
  84. )
  85. )
  86. (global-set-key (kbd "<C-f1>") 'jump-forward-and-highlight-inside-quotes)
  87. (global-set-key (kbd "<C-f2>") 'jump-forward-and-highlight-inside-pairs)
  88. (global-set-key (kbd "<C-f3>") 'eval-buffer)
  89. ;;=====================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement