Questions tagged [navigation]

Use the navigation tag for questions about moving around: to different places within a file/buffer (i.e., beginning, end, across paragraphs and code blocks); from one window to another (i.e., changing which window you are working in, and which files/buffers are displayed in each window).

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

Is there an easy way to copy files with ido navigation?

I'd like to be able to do something like this: Navigate to a buffer associated with a file C-x C-w (enter file ido file writing mode) navigate via ido to another directory Do something at this point ...
0
votes
0answers
22 views

emacs navigation keys doesn't work when input is not english

I'm korean, and I use english / korean while editing in emacs I mainly used terminal based emacs (emacs -nw) and in there, I can do basic navigation (such as C-e for move to end) in any language I'm ...
0
votes
1answer
60 views

forward/backward/next/previous element against YAML?

The lisp program is structured language, and one can execute C-M-f(forward-sexp) to pick the next sibling element. Similarly, C-M-b, C-M-u, C-M-d are defined; they can be used to move the cursor to ...
3
votes
3answers
798 views

Jump to location in org-mode while properly unfolding headings

I'd like to find a way to jump to a location in an org-mode file while automatically unfolding only the heading at the location I'm jumping to and all its parent headings (but not any sibling headings)...
0
votes
0answers
17 views

forward-sexp in markdown-mode doesn't handle backquoted expressions

How do I modify the syntax table to make forward-sexp and backward-sexp correctly skip over backquoted (code) expressions? For instance, if my markdown file contains a line like The C statement is `...
0
votes
1answer
302 views

Enter does nothing in NeoTree

I have NeoTree installed. When I navigate through folders and files in it and when I press enter, nothing happens. I don't get into a directory. I've tried TAB also -- nothing. M-x describe-key ...
2
votes
0answers
31 views

How to move by defun without moving up a level?

I am attempting to navigate methods in a file. Typically these are javascript or python files, which have a classes at the "top level", which in turn have methods nested within those ...
0
votes
1answer
29 views

Can I navigate Bookmark+ bookmarks like I can with e.g. helm-bookmark?

I am experimenting with Bookmark+ and would like to be able to navigate to a bookmark using a similar workflow to that which I currently use to navigate bookmarks. For example, previously in order to ...
4
votes
1answer
128 views

Is there a way to get proper “breadcrumbs” behavior in emacs?

I want something that I figured would be pretty basic, what with all the fancy mark-ring and all, but I can't find a way to get. I want a global (i.e. across files) no-nonsense "breadcrumbs" behavior ...
6
votes
4answers
1k views

Quickly jump to favorite folders

What I actually want I have deep folder structures, and often use a dozen folders pretty far down the directory tree. In Nautilus, I use bookmarks to get to them quickly. I want the same thing in ...
0
votes
0answers
15 views

Moving back to previous cursor position in rg.el

I am using rg(https://github.com/dajva/rg.el) to search in a project. When I click on one of the files rg has found and go to that location I am unable to go back to the previous location. I have ...
0
votes
1answer
103 views

Move cursor to opened file in sr-speedbar

i wonder how i can configure the sr-speedbar mode to automatically move the cursor to a file, which i open by pressing enter in the sr-speedbar. Thanks for your input.
0
votes
0answers
31 views

What does the “Mark set” message mean when going to the beginning or end of the buffer?

Opening emacs -Q, then Pressing Ctrl-Home or Ctrl-End also shows this message. Mark set What is happening? Why is the mark set and is there a way not to set the mark?
0
votes
1answer
26 views

How do I exit an archive in no-window mode?

When navigating the directory structure in no window mode, there is always .. at the top of the current directory, so that one can leave it and go to the directory up ahead. I am using emacs 26.3 ...
43
votes
12answers
7k views

How to switch back and forth between two locations in a buffer

Sometimes I find myself frequently alternating between two functions that I am editing in conjunction with each other. In these situations, it is tedious and painful to keep on doing a C-s <...
4
votes
4answers
469 views

Is there a setting to center the text after any jump?

For any jump to a new buffer(for example from the ack buffer or godef-jump) point is left at the very bottom of the window. Is there a global configuration to automatically center occur and similar ...
0
votes
1answer
49 views

Automatic “push-mark” when navigating with xref, find-grep, etc?

There seem to be a lot of situations, where a command changes the cursor location (point), but no mark is pushed, making navigating back by popping the mark with C-u SPC impossible. For isolated use-...
0
votes
2answers
69 views

How to navigate to the next/previous python class?

I would like to navigate quickly between classes in Python code. I'm looking for a command to go to the next / previous class so I can bind that to a key sequence. This question is not about ...
1
vote
1answer
28 views

forward-word and non-letter “words”

Using forward-word with this line: foo *** *** bar, I want to have the folowing behavior: foo| ***| ***| bar|, Not: foo| *** *** bar|, So, if between spaces there are only non-letter symbols, ...
4
votes
3answers
198 views

How to move the cursor to the next instance of the text the cursor is currently on?

Suppose your code looks like this: 1. term_cursor_is_on = 500 2. cursory_next_line = 42 [...] 101. next_instance_line = term_cursor_is_on And suppose that your cursor is on line 1 (unimportant, but ...
4
votes
2answers
139 views

Selecting punctuation, namely, periods, commas, question marks, exclamations, etc. in Emacs

I use Emacs mostly for writing text not code. This involves a great deal of selecting, deleting and editing, as one would expect. By default if I move forward by a word in Emacs, Emacs ignores basic ...
2
votes
3answers
155 views

How to open a diff at the position of the current buffer?

Emacs has a useful feature to jump to the line (via diff-goto-source-and-close). Is there a way to do the reverse with vc-root-diff or something similar? That is to open a diff, jumping to the ...
6
votes
3answers
304 views

Is there a way to make the “o” keypress of other-window <C-x><C-o> repeatable?

Question is as stated in the title. Instead of using various packages for switching windows, it might be simpler to make <C-x><C-o> behave like <C-x><C-+>, such that repeated ...
0
votes
1answer
142 views

How to skip to the last non-blank line?

Is there a way of calling (end-of-buffer) that excludes trailing empty lines?
0
votes
1answer
110 views

Add browser bookmark to bookmark browser

What I mean is, can I add a URL to my Emacs bookmarks, such that selecting the bookmark runs the URL through browse-url? Desired behavior What I would like is a bookmark-set-url function that ...
3
votes
1answer
183 views

How can I navigate up/down a log from magit-rev-mode?

When I'm reviewing a patch series in magit I want to be able to look in detail at each patch in a tree. However there doesn't seem to be an easy way to navigate to the next/previous commit from inside ...
1
vote
2answers
1k views

After executing org-narrow-to-subtree, how do I move between subtrees of the same level?

When I have executed (org-narrow-to-subtree), how can move between subtrees of the same level. Is this possible? I have tried next/previous heading C-c C-n/p next/...
1
vote
0answers
32 views

Idempotent `beginning-of-defun`

How to obtain/implement a beginning-of-defun drop-in replacement that is idempotent? i.e., if I already am at the beginning of a defun, beginning-of-defun should do nothing, rather than jumping to ...
3
votes
2answers
394 views

Bookmarking / Highlighting lines in a file

Is there an Emacs feature for highlighting some lines in a file to make it easier to jump around? My immediate use-case is a gigantic auto-generated C++ file with horrible indentation, which is rather ...
1
vote
1answer
59 views

next-line-add-newlines breaks history browsing by cursor arrow keys

I've always hated "end of buffer" errors, so my .emacs contains (setq next-line-add-newlines t) Recently, I've noticed that when browsing a history by cursor arrows (up/down for previous/next), e.g. ...
105
votes
13answers
56k views

How to switch between windows quickly?

How do I switch between windows quickly? I often have multiple windows open and need to switch between them. Right now, I use C-x o to get to the one I want. Is there a more efficient workflow ...
4
votes
1answer
111 views

Can I focus the echo area when there’s no prompt?

Suppose I type M-! uname -a RET. A message like this is displayed in the echo area: Linux pergamon 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux I want ...
1
vote
1answer
170 views

How to find where a given function is called from in gtags

I am using gtags and can jump to where a function is defined. Howeve I am not able to find inside a function where it is begin called from. Is there anyway to find where a function is called from?
2
votes
0answers
409 views

Navigate C/C++ Source Code with Emacs [closed]

So, i'm finally starting to work with a multi-file Project in C++ and am in need for smart navigation and completion! So far, i've used company-mode (with irony and company-headers), which is great if ...
15
votes
2answers
12k views

How to navigate quickly to my installed packages?

When I'm in the package manager (M-x package-list-packages), I'd like to quickly navigate to my installed packages. There are literally thousands of packages marked as available, installed, or built-...
2
votes
3answers
80 views

is there a keybinding to save curor position for returning after viewing other section of same buffer?

when i am editing a large file, often need to view other sections of the same buffer only once. But after that I need to go back to the position I was editing at. Is there a key for doing that?
6
votes
2answers
863 views

Preventing mouse clicks in inactive windows from repositioning the cursor

When I have Emacs (24.4, Mac OS, NS build) in the foreground, I often have many windows open in one frame. I sometimes want to switch windows by clicking in an inactive window. By default, this calls ...
1
vote
2answers
88 views

How do I return to where I was before i-search, goto line, etc

Let's say I'm on line Y, char X, and then do an i-search or do a goto line. Then I move around there a bit, but then I want to return to Y, X. How do I do this? Is there an automatic mechanism that ...
0
votes
0answers
118 views

How can I run (recenter) after (call-interactive …) that jumps to a buffer?

I would like to jump to a buffer using rtags for eg. Example snippet: (defun generic-lookup () "Follow link/goto line." (interactive) (cond ((string= major-mode "c-mode") (progn ...
0
votes
1answer
37 views

How can I return back to point position after jumping by `<down-mouse-1>`?

How can I return back to point position after jumping by <down-mouse-1>? Example: moving in the buffer for a while with C-pbfn, then use mouse for navigation, and press C-u C-<space> ...
0
votes
1answer
41 views

Strange <left> behaviour

Usually <left> is bound to 'left-char I have never edited this in my init file or <right> for that matter. However recently when I'm at the beggining of a line and I type <left> it ...
3
votes
3answers
329 views

Open Dired for an arbitrary set of files

There is a project with 100 files in a flat directory. I want to navigate a subset of the files, depending on what part of the project I am working on. Creating files with links to files of interest ...
1
vote
1answer
131 views

How to navigate to previous cursor positions without using the mark?

I'm often making typing mistakes which will kick me out of the current function block (hitting M-n when I meant C-n). In such cases it would be nice to be able to return immediately to the previous ...
2
votes
2answers
164 views

Navigate to a certain paragraph number

How can I navigate to a certain paragraph number? If I want to move to the 33rd line in a file, I execute M-x goto-line <RET> 33, but there does not seem to be an equivalent goto-paragraph ...
0
votes
2answers
89 views

Want equivalent of vim W and E

Any easy way to get forward/backword word movement with "word" defined as everything non-whitespace, similar to vim's W and E?
3
votes
2answers
576 views

Next/previous buffer in arbitrary order

How to move to previous or next buffer in a fixed & arbitrary order? I am using C-<left> and C-<right> but they move in a variable order, depending on the last viewed buffer, but if I ...
0
votes
0answers
59 views

Using advices to flatten a single subfolder

One of Github's features i like is that it "flattens" path if a folder contains only one subfolder, i.e you have a src folder which has only main folder, so by clicking on src you go to the content of ...
4
votes
2answers
557 views

Go to window by buffername

I would like to be able to switch to an open window by typing the name of the buffer which is displayed in it. It would be something like C-x b which opens the selected buffer only if it is not opened ...
3
votes
1answer
349 views

Navigate cursor position history with line-based jumps

I use point-undo to jump between positions in the cursor history. However, point-undo uses every previous position of the cursor, and I often experience that what I actually want is to jump just to ...
0
votes
1answer
34 views

linum referring to the top of the window

I use the "go to line" navigation a lot, but mostly of the time I have to type a three digit number in order to navigate through the document. I would like to have a row count referring to the ...