Code Monkey home page Code Monkey logo

vim-plugin-autosess's Introduction

autosess

Description

Start Vim without file arguments to automatically load previous session for current directory. This make easier work with complex projects - just chdir to project directory and start vim.

When you quit from Vim, if there are more than one open tab/window, session will be automatically saved. This let you edit single files in same directory without breaking your saved session. (Quickfix and vimdiff’s windows are ignored.)

If you quit from Vim with no open files, session will be deleted. This let you start usual empty Vim in this directory next time.

vim-plugin-autosess's People

Contributors

powerman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vim-plugin-autosess's Issues

Not working with NERDTree

When I open vim again and session start to restore I receive the following error:

Error detected while processing VimEnter Autocommands for "*"..function AutosessRestore[11]..script /Users/diegomarangoni/.vim/autosess/
%Users%diegomarangoni%projects%myproject.vim[17]..WinLeave Autocommands for "NERD_tree_*":
E121: Undefined variable: b:NERDTree

Highlight lines in .vimrc not saved/restored with sessions

I have two lines in my .vimrc file that are not active when autosess restores a session. I’ve tried manually deleting the sessions and starting over with no success. If I start a fresh vim instance with no saved session and open a file where these would apply (like an html file), it works fine. When I then quit so that autosess saves the session, and restore it, they are not active. I can at that point source the .vimrc file and it will apply them, but they’re never active when a session is restored no matter what.

highlight Comment cterm=italic gui=italic
highlight htmlArg cterm=italic gui=italic

red text

Im new to vim so forgive me if this is obvious, but I get some red text that pops up when closing vim and it is so fast I can't read it, but when I re-open vim the session isn't saved. I am getting the red text is an error, but obviously I couldn't read it.

Am I doing something wrong here?

Thanks

Support for persisting buffers

This plugin supports persisting windows and tabs; it would be really nice if it supported persisting buffers as well! Thank you!

Readonly stdin not working

With autosess enabled, starting vim in readonly from stdin does not work as expected.
echo "abc" | vim -R -

The content of stdin was discarded / replaced with session loading.

However, without readonly options including -R or set nomod, the content of stdin was preserved.

Error when setting autosess_dir in Gvim

I have been trying to set autosess_dir in _vimrc file in GVim. And it keeps giving me this errors.

Here are things I tried without success.

let autosess_dir=$$USERPROFILE/vimfiles/sessions/
let autosess_dir=~/vimfiles/sessions/
let autosess_dir=c:\\users\username\\vimfiles\sessions

It gives the following error.

E121: Undefined variable: vimfiles
E15: Invalid expression: $USERPROFILE/vimfiles/sessions/

Doesn't play nicely with NERDTree Plugin

When exiting vim with the very popular NERDTree file tree explorer active the session vim-plugin-autosess saves and then tries to restore complains that buffer name already exists.

Subsequent restores don't complain but there is a screen split with an empty buffer where NERDTree would normally be.

Is it possible to add some type of exclude functionality for the NERDTree buffer?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.