aboutsummaryrefslogtreecommitdiff
path: root/Doom/.doom.d/org
diff options
context:
space:
mode:
authordx <aryadevchavali1@gmail.com>2020-05-10 18:01:37 +0100
committerdx <aryadevchavali1@gmail.com>2020-05-10 18:01:37 +0100
commitf4ad02ef8102f9955583609daaf98753a747db01 (patch)
tree786cdd092d8e04ee24204982ebecf9bc4973c16b /Doom/.doom.d/org
parent786b21b01941cb37f0673260f5a23816d85580b0 (diff)
downloaddotfiles-f4ad02ef8102f9955583609daaf98753a747db01.tar.gz
dotfiles-f4ad02ef8102f9955583609daaf98753a747db01.tar.bz2
dotfiles-f4ad02ef8102f9955583609daaf98753a747db01.zip
+narrowing module, from narrowing handler in config.org
Diffstat (limited to 'Doom/.doom.d/org')
-rw-r--r--Doom/.doom.d/org/config.org17
1 files changed, 1 insertions, 16 deletions
diff --git a/Doom/.doom.d/org/config.org b/Doom/.doom.d/org/config.org
index a25ed65..5596b12 100644
--- a/Doom/.doom.d/org/config.org
+++ b/Doom/.doom.d/org/config.org
@@ -460,21 +460,6 @@ General keymap
:desc "Swap windows" "S" #'ace-swap-window) ; allows me to switch windows more efficiently than before, better than just motions
#+END_SRC
** Code
-*** Narrow handlers
-- Toggles narrow to function by checking a variable
-#+BEGIN_SRC elisp
-(defvar dx:narrow/narrow-state 't "To narrow or not to narrow")
-(defun dx:narrow/toggle-narrow-state ()
- "Toggle the state of dx:narrow/narrow-state between 't and 'nil"
- (if (= dx:narrow/narrow-state 't)
- (setq dx:narrow/narrow-state nil)
- (setq dx:narrow/narrow-state 't)))
-
-(defun dx:narrow/toggle-narrow ()
- (interactive)
- (cond ((dx:narrow/narrow-state) (narrow-to-defun))
- (t (widen))))
-#+END_SRC
*** Keybinds
- Some keybinds for the code prefix which help me with coding or working with
code, particularly LSP
@@ -484,7 +469,7 @@ General keymap
:prefix ("c" . "code") ; Code
:desc "Compile via make" "C" #'+make/run
:desc "Undo tree" "u" #'undo-tree-visualize
- :desc "Narrow to function" "n" #'dx:narrow/toggle-narrow
+ :desc "Narrow to function" "n" #'+narrow/toggle-narrow
(:after format-all
:desc "Format code" "=" #'format-all-buffer)
(:after lsp