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 874689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:08:41+00:00 2026-05-15T11:08:41+00:00

EmacsWiki says : There is a way to make Viper state and Viper insert

  • 0

EmacsWiki says:

There is a way to make Viper state and Viper insert state global, like in Vim (and probably vi). In Vim (and probably vi), you start in Normal Mode. You can switch buffer, and Vim stays in Normal Mode. Pressing “i” puts Vim in Insert Mode. Then if you switch buffers by clicking on another window, Vim stays in Insert Mode. You don’t have to remember which buffer is in what mode, you only need to remember in which mode Vim is.

But unfortunately, they don’t say what this method is, and I couldn’t find it quickly. Does anybody know?

  • 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-05-15T11:08:41+00:00Added an answer on May 15, 2026 at 11:08 am

    I don’t know a single setting or package to do what you want. It’s not provided by viper itself.

    That said, you can write some advice which does the job. The key being that you need to advise all the ways you switch buffers/windows. For example, if you switch windows through the other-window command (C-x o), you’ll want this:

    (defadvice other-window (around other-window-maintain-viper-state activate 
                             activate)
      "when switching windows, pull the viper-current-state along"
      (let ((old-window-state viper-current-state))
        ad-do-it
        (viper-change-state old-window-state)))
    

    But, switching windows using the mouse doesn’t go through that function, and to get that to work you need to advise select-window in exactly the same way:

    (defadvice select-window (around select-window-maintain-viper-state activate 
                              activate)
      "when switching windows, pull the viper-current-state along"
      (let ((old-window-state viper-current-state))
        ad-do-it
        (viper-change-state old-window-state)))
    

    If you find you use another mechanism to switch windows/buffers that doesn’t use the above, it just takes a tiny bit of digging (M-x describe-key ) to find out what new thing you should be advising.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I installed haml-mode in my Emacs follow this article http://www.emacswiki.org/emacs/HamlMode There is my code
Mode : http://www.emacswiki.org/emacs/CSharpMode log: Loading /.emacs.d/contrib/dev/csharp-mode.el Done loading /.emacs.d/contrib/dev/csharp-mode.el File mode specification error: (void-function
Yesterday I found desktop mode from EmacsWiki, and then I configure it for my
I'm using WinDbg for kernel mode debugging and I'd like to use the emacs
There are a ton of ways to integrate Cygwin with Emacs on Windows. EmacsWiki
EDIT: 1. Let's not make this a general vim/emacs debate. I know some people
I have font-lock mode on by putting (global-font-lock-mode 1) in .emacs. And, with font-lock
mode is here : http://emacswiki.org/emacs/AutoComplete and in the bottom: I have a black background
I have the following defun's in my .emacs.d: ;;; http://emacswiki.org/emacs/ParenthesisMatching (defun goto-match-paren (arg) Go
I have used emacs for erlang programming. According to http://emacswiki.org/emacs/CompileCommand , I have configure

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.