Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [navigation]

The tag has no usage guidance.

1
vote
0answers
23 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 ...
1
vote
2answers
41 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 ...
0
votes
0answers
17 views

Ruby mode and/or snippets for jumping around statements

Is there currently a mode for the following examples: jumping to the end or beginning of a function the cursor is currently in. jumping around an if statement. ie from inside to the else, end and if ...
0
votes
1answer
16 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 ...
4
votes
1answer
52 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 ...
2
votes
0answers
172 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 ...
2
votes
3answers
72 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?
0
votes
1answer
62 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?
1
vote
2answers
78 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
58 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
128 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 ...
1
vote
1answer
32 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. ...
0
votes
1answer
29 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> ...
3
votes
3answers
348 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)...
6
votes
4answers
495 views

Quickly jump to favorite folders

What I actually want I have deep folder structures and use about a dozen folders pretty far down the directory tree a lot. In Nautilus, I use bookmarks to get to them quickly. I want the same thing ...
3
votes
3answers
231 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 ...
0
votes
1answer
40 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
2answers
157 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
71 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
1answer
91 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
1answer
79 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 ...
0
votes
0answers
38 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 ...
3
votes
2answers
265 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 ...
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 ...
1
vote
1answer
258 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
2answers
179 views

browsing/navigating reStructuredText

What Emacs utilities can provide better browsing and navigation of reST documents? Alternatively, how to configure existing utilities to work with reST? What I mean, why I ask: Of the lightweight ...
3
votes
0answers
58 views

Working around preprocessor blocks

I am trying to navigate a C project that has lots of preprocessor directives like this: #ifdef SOME_COMPILE_TIME_VARIABLE for ( idx=0; idx<FOO; idx++ ) { #else for ( idx=0; idx<BAR; idx+...
1
vote
1answer
204 views

Back/forward navigation that works like IntelliJ/Eclipse

I've been trying to find a navigation package that allows backwards/forwards navigation across and within buffers. I have found a lot of solutions out there but none of them seem to solve the whole ...
1
vote
1answer
641 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/...
3
votes
1answer
36 views

Previous/next occur result, independently from compilation errors

After running M-x occur, the commands next-error and previous-error let me navigate between hits. I would like to be able to M-x compile my program and then keep browsing through the same *Occur* ...
3
votes
2answers
377 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 ...
2
votes
0answers
84 views

Navigating in an nXML buffer

I'm editing an XML with nXML-mode. The file represents a document and has internal links of the form: Follow <linktag docref="foo">this link</linktag> to see <anchortag docref="foo">...
1
vote
0answers
24 views

Navigation ignores comment blocks in (La)TeX mode

I sometimes leave large blocks of comments in LaTeX source code: Text text text text. % Comments comments comments comments. % Six lines of comments. % More comments. % Separate comment block. % ...
9
votes
2answers
582 views

Navigate to the source code of built-in functions and variables

Throughout the day I am constantly using C-h f or C-h v (describe-function and describe-variable) to look up documentation for functions and variables. More often than not, if I don't get all the ...
0
votes
0answers
136 views

Emacs doesn't understand where the windows are?

This has occurred several times now. I will have an Emacs session (24.5.1, OSX UI version installed via homebrew) running for a while when suddenly it no longer seems to understand how to navigate ...
0
votes
2answers
73 views

Navigating rspec files

Usually I use incremental searching to find what I'm looking for. Also, in general I write very small methods that easily fit in one screen. So before now I have had little use for any sort of code-...
0
votes
0answers
183 views

forward-to-word functionality with subword-mode

I frequently type camelCase variable names, and enjoy the features subword-mode offers. This, this and this reiterate the fact that the community desires vim-like functionality where they can choose ...
2
votes
2answers
191 views

Make forward-word not to jump over newline character

I have a text like this, testStatus['id'] = elt.$.id^^''&&&& testStatus$$['suite_id'] = "" where ^^ is my cursor position. When I press M-f, it uses forward-word and end up in the ...
2
votes
0answers
258 views

How to go to the beginning of a word/sexp?

When the point is not at the beginning of a word/sexp, backward-word / backward-sexp places the cursor at the beginning of that word/sexp. If the point is already at the beginning of a word/sexp, this ...
2
votes
2answers
176 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 ...
6
votes
1answer
47 views

forward paragraph — ignore carriage return in comment

I like to use the forward- and back-paragraph methods to jump around my source code. I would like it to behave slightly differently though. Consider the following comment block: // comment line one....
3
votes
2answers
223 views

forward-sexp goes to eol in python mode (but only sometimes)

When I run the command forward-sexp at the beginning of the line in Python mode, my cursor jumps to the end of the line. I assume that the line is a statement, and is therefore considered to be a ...
3
votes
3answers
1k views

How to open files out of long directory trees using helm-find-files?

Helm features buffer navigation that is more powerful than ido but apparently has a bit of a learning curve. Say I want to open a file in java/com/example/apple/banana/cat/dog/elephant/fig/grape/...
6
votes
2answers
999 views

Emacs lisp forward-sexp: Scan error: “Containing expression ends prematurely”

When writing Emacs Lisp code, I use forward-sexp (C-M-right) and backward-sexp (C-M-left) to navigate the buffer. However, in some cases these functions stops with error like: forward-sexp: Scan ...
6
votes
2answers
789 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 ...
12
votes
2answers
4k views

Better indentation and navigation in assembly source code

When I write C or Java code it's extremely regular, but with assembly (asm-mode), it's so disorganized. I'm using auto-complete and yasnippet. I created snippets and am using them, but the code ...
13
votes
1answer
854 views

When switching buffers, prevent emacs from automatically switching frame

When I switch buffers, emacs will switch to an existing frame if the buffer is already opened there. I found how to prevent that when switching with ido using : (setq ido-default-buffer-method '...
75
votes
14answers
39k 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 ...
38
votes
12answers
5k 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 <...
12
votes
2answers
8k 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-...