Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8281933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:12:16+00:00 2026-06-08T10:12:16+00:00

These are some awesome options: emacs-24, evil-mode (using vim bindings in emacs), and undo-tree.

  • 0

These are some awesome options: emacs-24, evil-mode (using vim bindings in emacs), and undo-tree.

However, when I’m in edit mode (insert mode), I sometimes jump around for a number inserts, deletes, etc. before hitting escape and leaving insert mode.

“Undo” takes the whole insert (including deletes) as one edit. For example, I can’t undo the paragraph I accidentally deleted without undo’ing the whole delete!

Is there any way to fix this?

Here are some related links:

  • How Emacs determines a unit of work to undo
  • http://vim.wikia.com/wiki/Using_undo_branches
  • http://vim.wikia.com/wiki/Modified_undo_behavior
  • This tip probably has best explanation from the vim side.

Here are the vim mappings that convert certain vim commands so that they can be undone:

inoremap <c-u> <c-g>u<c-u>
inoremap <c-w> <c-g>u<c-w>
inoremap <End> <C-g>u<End>
inoremap <BS> <c-g>u<BS>
inoremap <CR> <c-g>u<CR>
inoremap <del> <c-g>u<del>

What is needed is for the undo mode inside of emacs evil undo-tree to track additional events besides just leaving insert mode. For example, you should be able to stay in insert mode a long time and then undo any sort of delete, cut, paste.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:12:17+00:00Added an answer on June 8, 2026 at 10:12 am

    Try evil-want-fine-undo:

    Whether actions are undone in several steps.
    There are two possible choices: nil ("no") means that all
    changes made during insert state, including a possible delete
    after a change operation, are collected in a single undo step.
    Non-nil ("yes") means that undo steps are determined according
    to Emacs heuristics, and no attempt is made to aggregate changes.

    (setq evil-want-fine-undo t)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using AFNetworking for asynchronous calls to a web service. Some of these calls
Getting these errors in some java code http://tutorials.jenkov.com/java-multithreaded-servers/multithreaded-server.html Exception in thread Thread-0 java.lang.RuntimeException: Cannot
I am trying to test some of these code here http://ha.ckers.org/xss.html on my code.
I'm making a simple app that makes some calculations. Some of these calculations are
Hi everyone, I'm stuck these days on some memory leaks. The app I'm making
Here's the output. These are utf-8 strings I believe... some of these can be
I am starting a project which has several applications. These applications share some common
I'm building a large Java application that uses multiple pop-up windows. Some of these
I have a list of smart pointers. I want some of these smart pointers
I have multiple pages being pulled together into a single page. Some of these

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.