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

  • Home
  • SEARCH
  • 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 97633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:02:32+00:00 2026-05-11T00:02:32+00:00

My usage-scenario may seem a bit unusual, but here it is: When using vim

  • 0

My usage-scenario may seem a bit unusual, but here it is: When using vim (it’s one of about 4 different editors I use regularly), I use it in two different situations. The first is via the GUI, in which I’ll have multiple buffers and have some settings different than when I use it from the command-line (by testing ‘if has('gui_running')‘). The other is when I need to do something short-and-quick, from the command-line, such as make a small change to a dot-file or other type of config.

What I would like to do, is have sessions enabled for the GUI, but have any command-line invocations ignore them. That is, I don’t want to bring up the full existing session on a CL invocation, nor do I want it (and whatever buffer/file it involved) to alter the session that the GUI is using. As I’m fairly new to the post-vi-functionality of vim, I’m not really sure how to pull this off.

  • 1 1 Answer
  • 2 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. 2026-05-11T00:02:32+00:00Added an answer on May 11, 2026 at 12:02 am

    do your session magic in your .gvimrc and everything else in your .vimrc. The GUI will source both, but the CL version will only source the .vimrc.

    The session magic is to set up autocommands to write your session to a file on exit, and reload it by sourcing the file upon entrance.

    au VimLeave * mksession ~/.gvimsession au VimEnter * source ~/.gvimsession 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Usage scenario We have implemented a webservice that our web frontend developers use (via
According to [MSDN: Array usage guidelines]( http://msdn.microsoft.com/en-us/library/k2604h5s(VS.71).aspx) : Array Valued Properties You should use
C Interfaces and Implementations shows some interesting usage patterns for data structures, but I
Is using SSIS to do reformatting of flat files from one format to another
It may not be best practice but are there ways of removing unsused classes
Usage scenario: # case #1 - for classes a = MyClass() # default logger
Here is a description of the scenario and I would appreciate also any comments
Scenario: Using a tiered approach with WCF services: business services returning domain / DTO
MSDN discourages the use of EventTrigger 's and really any custom trigger actions but
I am using boost_logging for my project. In one of my file I just

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.