Git Product home page Git Product logo

vim-prosession's Introduction

VIM ProSession v0.7.5 Build

A VIM plugin to handle sessions like a pro.

It leverages vim-obsession and allows switching between multiple sessions cleanly, the idea is to maintain one session per project (directory) and switch between them when we need to switch context, automatically loading along with it the various files, settings etc ensuring compete isolation between projects. Now there's little need to launch multiple vim instances for separate sessions (projects), you can simply switch between them with ease.

ProSession uses a file name format similar to the undofile name format. :Prosession provides existing session paths from the sessions directory from g:prosession_dir (set to ~/.vim/session/ by default) or also completes paths from the file system which you can use to start new sessions for them. For more details check :help prosession.

Prosession also provides a telescope extension, to list and switch to other sessions with Telescope, you can use Telescope prosession and that launches telescope picker with list of all existing sessions that you can find through and select to switch to it

Change Log

See CHANGELOG.md

Requirements

Vim ProSession depends on tpope/vim-obsession

Installation

  1. With NeoBundle:
NeoBundle 'dhruvasagar/vim-prosession', {'depends': 'tpope/vim-obsession'}
  1. With Vundle
Plugin 'tpope/vim-obsession'
Plugin 'dhruvasagar/vim-prosession'
  1. With Pathogen
cd ~/.vim/bundle
git clone git://github.com/tpope/vim-obsession.git
git clone git://github.com/dhruvasagar/vim-prosession.git
  1. With Lazy
return {
  "dhruvasagar/vim-prosession",
  dependencies = {
    "tpope/vim-obsession",
  },
}

Telescope Picker

vim-prosession now ships with a telescope picker that allows you to switch to existing sessions using telescope. Use the command : Telescope prosession to launch the picker.

Load Telescope Extension

require('telescope').load_extension('prosession')

Custom Mapping for Telescope Prosession Picker

vim.keymap.set('n', '<Leader>fp', '<cmd>Telescope prosession<CR>')

vim-prosession's People

Contributors

blueyed avatar dhruvasagar avatar eight04 avatar gee19 avatar gouwazi avatar jason0x43 avatar javierparra avatar jebaum avatar l-jovi avatar leonidborisenko avatar lynndylanhurley avatar m42e avatar rbrda avatar sameer1612 avatar sankhesh avatar tsfoster 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  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  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  avatar  avatar  avatar  avatar

vim-prosession's Issues

In windows this does not work

This error is still exists #31. When I make new session it saves session file without path, just the session name. When I try open it - "Directory not found".

Allow to define certain directories to be ignored by Prosession

I came up with the following zsh function as a working alternative, where vim is remapped so that:

  1. When executed at the home directory, no auto-loading of Prosession shall occur,
  2. When executed from other directories, Prosession will load automatically by default.
# This is a simple zsh function that remaps `vim` to be aware of where it is called
    # Note, the "$1" piece is necessary to have.
function vim() {
    if test $(pwd) = "/home/username"; then
        # excluding the home dir
        /usr/bin/vim --cmd "let g:prosession_on_startup=0" $1
    elif [ $(pwd) = "/home/username/Yet_another_dir" ]; then
        # excluding another dir
        /usr/bin/vim --cmd "let g:prosession_on_startup=0" $1
    # more directories can be added here :)
    else
        /usr/bin/vim $1
    fi
}

@dhruvasagar An option like g:prosession_no_auto_start_dir would be a more elegant solution.

Originally posted by @llinfeng in #68 (comment)

Session files don't get generated with their paths when &shellslash is enabled in Windows

Relevant: #37, #42

function! s:undofile(cwd) "{{{1
  if (exists('+shellslash') && &shellslash) || has('win16') || has('win32') || has('win64')
    return substitute(a:cwd, '\', '%', 'g')
  else
    return substitute(a:cwd, '/', '%', 'g')
  endif
endfunction

The check for shellslash on Windows on that line becomes useless because of the following statements. The only time getcwd() will return paths with backslashes is when &shellslash == 0 and given that Linux doesn't have it, the conditional should simply be:

  if exists('+shellslash') && !&shellslash
    return substitute(a:cwd, '\', '%', 'g')
  else
    return substitute(a:cwd, '/', '%', 'g')
  endif

Always use absolute path

Hi,

Currently, Prosession create different session files if I run it with different parameters, although all of them resolve to the same folder.

For example, I have a project folder: /home/nghialm/projects/personal/test

  • When I'm in /home/nghialm/projects/personal/test and I run :Prosession ., it will create %home%nghialm%projects%personal%test.vim in g:prosession_dir

  • When I'm in /home/nghialm/projects/personal and I run :Prosession test, it will create test.vim in g:prosession_dir

  • When I'm in /home/nghialm/projects and I run :Prosession personal/test, it will create personal%test.vim in g:prosession_dir

Is it possible to make :Prosession path resolve path to its absolute path before creating/loading the session file? So that wherever I run :Prosession, it would result in the same session file.

I'm using neovim master (neovim/neovim@e3afb30e6)

Invoking ":Prosession . " crashes neovim

I can't get Prosession to work with neovim. It doesn't seem to save or restore anything and when i invoke it manually with e.g. ":Prosession . " it crashes with the following error message:

Error detected while processing function <SNR>27_Prosession[8]..<SNR>27_GetSessionFile[1]..<SNR>27_GetSessionFileName[1]..<SNR>27_GetDirName:
line    2:
E121: Undefined variable: dir
E116: Invalid arguments for function s:StripTrailingSlash(dir)
E15: Invalid expression: s:StripTrailingSlash(dir)
line    6:
E121: Undefined variable: dir
E116: Invalid arguments for function s:undofile(dir)
E15: Invalid expression: s:undofile(dir)

Tmux title wrong when folder has "." in it

My tmux window name drops everything after the ".". I come across then when working in "~/.dotfiles" or ~/example.directory.name".

I think you have tried to fix it before with a146ea2, but it's not working for me. I tried fixing it myself but am not very used to VimL, so I wasn't able to do it without introducing a weird bug.

Globbing relies on a trailing path separator character

Session name completion doesn't seem to work when the path set in g:prosession_dir doesn't have a trailing path separator.
This "~\vimfiles\sessions\" works while "~\vimfiles\sessions" doesn't.
Changing line 68 to:

    let flist = glob(g:prosession_dir . flead . '/*.vim', 0, 1)

seems to solve it.(Disclaimer: very little Vimscript skills)

procession doesn't set filetype for vimwiki buffers

When using prosession to restore a session with vimwiki buffers, the filetype is not automatically set. The correct filetype is set once you refocus on the window.

This doesn't seem to happen with standalone Obsession

Does not work nice with +command

I'm using neovim as my man command.
Basically like this: nvim +Man fzf
Since I installed prosession this doesn't work anymore since instead the session is loaded.
Is there a way you can determine if vim was started with a command and then don't restore the saved session?

Folder name with extension `.vim` works weird

I have two folders:

/project/a-project.php
/project/b-project.vim

When I use :Prosessions /project/a-project.php, it will save session name %project%a-project.php.vim. It is right.

But, when I use :Prosessions /project/b-project.vim it will save session name b-project.vim only. Is it expected behavior? I assume it should be %project%b-project.vim.vim

Improved "Getting Started" documentation

Request: Improve the README.md file for newbies to understand how to do this.

Here's what I did. I'm totally lost now.

  1. Discovered that this existed after reading this post I think to myself, "Oh, I get it. Obsession makes session files (but maybe puts too much in them) (and leaves them all over the place) This Procession thing puts the session files into a central location so as to not clutter up my folders and it is smart about what gets serialized to the session files. I want to try this"

  2. Installed the two plugins

Plugin 'tpope/vim-obsession'
Plugin 'dhruvasagar/vim-prosession'
  1. In the terminal, I navigate to where my code is at and start vim

  2. Split the window in two, loaded a different source code file in each

  3. Hmm... Now what... "I guess I type :Obsession?"

and that made a file called Session.vim

"Wait a minute, I thought this was supposed to prevent that. I'll just see what happens"

  1. Quit vim

  2. Now what... I guess I type in vim -S Session.vim?

and that didn't seem to work. I got a blank vim.

And now I start the guess-work.

  • Should I have typed :Procession? (tries that)
  • I read that Procession puts the files into ~/.vim/session. So I go over there and do ls, up, I see them. Why don't they load? Hmm, why do I also have Session.vim then?
  • Goes back to the GitHub project page to learn more and there's nothing more to learn.

I think we need more "getting started" assistance.

Error at nvim startup

Hi. Thank you for this plugin. I've found a little issue.

I'm getting an error when starting nvim after updating this plugin to the latest code in master. I think it might be related to 1b0d02f.

I'm using Neovim 0.3.0.

This is the message:

Error detected while processing /home/berarma/.config/nvim/plugged/vim-prosession/plugin/prosession.vim:
line 9:
E121: Undefined variable: g:prosession_on_startup
E15: Invalid expression: g:prosession_on_startup

I've fixed it by setting the variable g:prosession_on_startup on my init.vim but this wasn't needed before.

Thanks.

vim -S not working

Using vim -S <sessionfile> does not work after having a session.

Steps to reproduce:

  1. disable the plugin
  2. start vim, do something, do :mksession foo-session.vim, exit
  3. enable the plugin
  4. start vim, do something different, exit
  5. start vim -S foo-session.vim

Expected behavior:

You should be in the session of foo-session.vim (step 2).

Observed behavior:

You are in the session of step 4.

Workaround:

:source foo-session.vim loads the session (but replaces the current one and changes are not tracked for foo-session.vim).

Versions:

$ vim --version | head -n 2
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 24 2020 03:21:40)
Included patches: 1-439

Problems with filenames and creating new session.

Prosession commands makes a clean session (is that how its supposed to work). If there are open buffers it closes them. Also the filename is kind of weird with the absolute directory from where the session is being created as part of the filename.

Cannot find directories ending with `.vim`

When I want to restore a session for a folder like .../ctrlp.vim it does not work because the session is saved as ...%ctrlp.vim and therefore looking for the folder .../ctrlp which does not exist.

default session

Hi -- I really enjoy your plugin. Having sessions in a central location is important -- Do you think it's worthwhile to introduce an option to allow a "default" session to autostart (one that is not based off the current working directory where vim is instantiated from without arguments)?

Opening anoter issue re: session naming

Directory does not exist

Let's say I have a session ".vim/sessions/meta.vim"

:Prosession meta

Autocomplete correctly, but when I press enter, I get the error:

Directory meta does not exist

To fix this I have to create the directory "~/meta"

The thing is I don't wanna have "~/meta" I want to have ~/activities/meta. There's some way to bypass the checking to achieve this? Thank you

New session creates X empty buffers (where X is number of buffers from previous session)

  1. Go to a project directory where you previously didn't have any vim session.
  2. Type vim to start vim and create a session for this project
  3. Quit vim (:qall), the session gets saved.
  4. Go to a different directory where you previously didn't have any vim session
  5. type vim to start vim and create a session for this project

As can be seen in the GIF below, after step 5 - three empty buffers are visible at the top until I open up a file (using Ctrl-P plugin in this case).

Can this be avoided somehow?
vim-prosession

Store the "alternative file" in the session

Hello,

I'd like to store the alternative file in the session so that I can close vim, open it back up and type <c-^> and automatically switch to the previous buffer that I was using.

I found a vi stack exchange answer which can do this:

function! MkSession(filename)
  execute 'mksession! '.a:filename

  let l:alternate = fnameescape(expand('#'))

  if l:alternate != ''
    call system('echo "let @#=\"'.l:alternate.'\"" >> '.a:filename)
  endif

endfunction

command! -nargs=1 MkSession call MkSession(<f-args>)

However, adding this to my vimrc doesn't solve the problem because vim-prosession isn't calling the new MkSession instead of mksession.

Is there a way for me to add something to my vimrc to make this work, or would it be possible to add an option to vim-prosession to save the alternative file so that it's available when opening up the session?

Perhaps I could change autocmd VimLeave * exec 'mksession!' g:prosession_dir . 'last_session.vim' to be autocmd VimLeave * exec 'MkSession' g:prosession_dir . 'last_session.vim' on my local copy? Alas, this didn't work for me, so there is probably more to it :(

Windows sessions ignore drive letters

One follow up observation and an additional problem based on the following correspondence table:

Windows Dir ignore_string
c:\TEMP "c:/TEMP"
d:\TEMP "d:/TEMP"

On Windows machines, it looks like vim-prosession does not care about the drive-letter, and saves the session into %TEMP.vim regardless of where GVIM is launched.

Improvement Request - :bd! on :terminal's as :bd causes E89

First off, thanks for making this as it's allowed me to switch from an incredibly slow TMUX workflow to a strictly NeoVim based workflow.

One thing I'm getting is this when I switch between sessions where there's a :terminal buffer open...

Error detected while processing function <SNR>68_Prosession:
line   17:                                                                                                                                                                              
E89: term://.//27779:/bin/bash will be killed(add ! to override)
E89: term://.//27934:/bin/bash will be killed(add ! to override)
Press ENTER or type command to continue

I think something similar was done for Shuogo's/bufexplorer plugin from what I was able to Google...
I noticed this line here...
https://github.com/dhruvasagar/vim-prosession/blob/master/plugin/prosession.vim#L134

I'm also asking because I'm really hoping this becomes a reality too...
tpope/vim-obsession#24

How to restore settings for help buffers, including syntax highlighting?

Hello,

I wrote a small plugin, which tries to do what vim-obsession does as well as some functionalities of vim-prosession (basically just restoring the last session automatically when Vim starts).

But it has an issue which I think vim-prosession also has. When my plugin restores automatically the session, if the latter contains a help buffer (and 'sessionoptions' contains help), its settings are not restored. Including the syntax highlighting.

I tried a workaround, invoking a function s:restore_help_settings_when_needed(), at the end of the restoration process. It iterates over the buffers and when it detects one whose path matches a help buffer, it sets the right options. For some reason, the settings don't survive if I reload the help buffer, so the function also installs an autocmd listening to BufRead:

call s:restore_help_settings_when_needed()

fu! s:restore_help_settings_when_needed() abort
    let cur_bufnr = bufnr('%')
    sil! bufdo if expand('%') =~# '/doc/.*\.txt$'
            \|     call s:restore_help_settings()
            \| endif
    if bufexists(cur_bufnr)
        exe 'b '.cur_bufnr
    endif
endfu

fu! s:restore_help_settings() abort
    setl ft=help nobuflisted noma ro
    so $VIMRUNTIME/syntax/help.vim
    augroup restore_help_settings
        au! * <buffer>
        au BufRead <buffer> setl ft=help nobuflisted noma ro
    augroup END
endfu

It works, but there's still an issue. If I try to jump to the definition of a tag defined in a help buffer which was restored by the plugin, again, there's no syntax highlighting in the new help buffer.

I don't know how the :help command works, but it seems that it reads the help buffers in a special way. So, I thought that the only way to restore a help buffer, was to use :help. Maybe using a code like this:

 exe 'h '.matchstr(expand('%'), '.*/doc/\zs.*\.txt')
 exe "norm! \<c-o>"

The first command would invoke :help on the current help buffer. The 2nd one would jump back to where the cursor was. It works but not immediately, I have to manually reload the buffer (and IIRC it opens another window, displaying the same buffer, so a window needs to be closed).

All in all, I haven't been able to find a way to restore a help buffer without some manual intervention.
I tried vim-obsession + vim-prosession and they seem to have the same issue.

By any chance, do you know why this happens, and how to solve it?

Thank you very much for your plugin.

Incompatibility with coc.nvim (E499)

Result from :CocInfo

versions

vim version: NVIM v0.4.2
node version: v12.13.0
coc.nvim version: 0.0.74-317e3212e3
term: tmux-256color
platform: linux

Messages

Output channel: watchman

Output channel: git

Looking for git in: git

git rev-parse --show-toplevel
resolved root: /home/francisco
resolved root: /home/francisco
git symbolic-ref --short HEAD
git diff --name-status
git diff --staged --name-status
git ls-files --others --exclude-standard

Output channel: snippets

[Info - 12:49:02 PM] watchman watching project: /home/francisco/.config/coc/ultisnips
[Info - 12:49:02 PM] subscribing "**/*.snippets" in /home/francisco/.config/coc/ultisnips

Output channel: prettier

Describe the bug

coc.nvim has some incompatibility with the vim-prosession that causes an error when leaving neovim:

[coc.nvim] Error on autocmd VimLeavePre: request error nvim_command - Vim(mksession):E499: Empty file name for '%' or '#', only works with ":p:h"

Reproduce the bug

  • Create file mini.vim with:

     set nocompatible
     augroup vimrc | autocmd! | augroup end
     
     if empty(glob('~/.vim/autoload/plug.vim'))
       silent !curl -fLo "$HOME/.vim/autoload/plug.vim" --create-dirs 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
       autocmd vimrc VimEnter * PlugInstall --sync | source $MYVIMRC
     endif
     
     call plug#begin('~/.vim/plugged')
     Plug 'tpope/vim-sensible'
     call plug#load('vim-sensible')
     Plug 'tpope/vim-obsession'
     Plug 'dhruvasagar/vim-prosession'
     Plug 'neoclide/coc.nvim', {'branch': 'release'}
     call plug#end()
  • Start (neo)vim with command: nvim -u mini.vim

  • Close nvim.

  • Restart (neo)vim with command: nvim -u mini.vim

  • Close nvim.

The error message shows up with closing, but it's pretty quickly. I couldn't reproduce the same on Vim, only with NeoVim.

Feature to start new session

Somewhat related to
#36
#3

When I first added vim-prosession I had nvim opened to my .dotfiles directory and I tried to do this :Prosession ~/code/my_project_root and that leaves me in one of two places depending on whether or not there was a :terminal buffer open in the previous session.

If there was a terminal buffer then the new session is open to seemingly the same terminal buffer and if I esc and open netrw I'm in the directory I passed to Prosession.

If there was not a terminal buffer than I start in an empty buffer and if I open netrw I'm in the directory I passed to Prosession.

I'm expecting that if I pass a new directory with no session to :Prosession that it'll start in whatever file-explorer I have installed. <- not sure this is even reasonable, but it's sort of what I expected at first.

Now I just sort of deal with it so make of this what you want :) 👍

closed buffers reapper

Hi
After update of vim-prosession every time when I'll close buffer (used with airline:tabline extension) and quit vim it reappear once I've start vim again.
In my session file next to badd ... I see entries like:
args dyd.txt
which is a cause of a problem.
Best
Mikolaj

Switching session does not respect `exrc` option

Hi,

I have set exrc in ~/.vimrc. When I switch session via :Prosession /path/to/dir, /path/to/dir/.[n]vimrc doesn't seem to be executed. Am I right in thinking that? Is it possible to have that happen, or would it lead to problems?

Thanks,

Toby

Neovim v0.2.2
macOS 10.13.3

Prosession seems to break ability to save tabs as part of the session

Not sure if I'm doing this wrong but if I have 2 tabs open, one of them used lcd so both tabs have different directories as their current directory. When I quit vim with :qa prosession creates 2 session files 1 for each tab.

If I do the same thing without prosession, obsession saves the tabs as part of my current Session.vim file. If I open vim with vim -s Session.vim I get both my tabs back and they are both using the correct directory.

I've read that some people like the idea of creating separate session files for each tab. That would be fine but the behaviour of prosession if I try to switch session in the second tab is to put me into a session with only 1 tab.

cannot display nerdtree with tmux plugin resurrect-strategy-vim

Hi, thanks for your smart lib :)

I use tmux plugin which called resurrect-strategy-vim and vim-obsession coexist that help me recover session, but nerdtree window always gone.

Then I try to use vim-prosession rather exec :Obsession command inside vim, but sometimes nerdtree show in a mess.

How shoud I fix it.

My env:
osx: 10.13.4
bash
tmux: 2.3
vim: 8.0

Thanks for your time.

Cannot open "/Users/leo/.vim/session/.lms.vim" for writing

My .vim directory is a symbolic link to one of my "dotfiles" subdirectories, so it's probably the reason why I see this on vim startup:

Error detected while processing function 44_Prosession:
line 22:
Vim(mksession):E190: Cannot open "/Users/leo/.vim/session/.lms.vim" for writing
Press ENTER or type command to continue

Option to load last opened session

I use this plugin to make new session and ctrlp-obsession plugin to switch between them, but I feel a lack of initial loading of last edited session. Is there a option to do it? It's a bit annoying for me to be opened at my home dir each time I start vim. (it's GUI version and I don't want to configure many desktops icons - one for each project). Most IDE's do it.

Add possibility to take git branch into account

It would be a great feature if it would be possible to take the branch of the directory into account.

So it will be easier to work in different branches.

A function like this should get you the current git branch.

function! GetCurrentGitBranch()
    return system("git symbolic-ref -q HEAD'")
endfunction

Error on startup

I recently updated my plugins and started receiving the following error on startup. Disabling prosession or deleting the session files makes the errors go away on startup.

Error detected while processing function <SNR>30_LeaveWin:
line 16:
E121: Undefined variable b:last_changedtick
Error detected while processing function <SNR>30_LeaveWin:
line 16:
E15: Invalid expression: b:changedtick > b:last_changedtick

Using Neovim v0.2.0-480-g25427ae8

session naming

I like the plugin -- especially keeping session files in a central location. The sha scheme is a bit confusing though -- do you think it's possible to adopt the file naming convention used by undodir ? it's a bit more readable and verbose.

Also does calling :Obsession pause the session recording/auto-updating as per tpotes plugin?

Thanks much!

Error opening session

Hello again! I just created a new git branch, and I'm seeing an error on nvim. It's worth noting to make some plugins work better, I just switched to neovim:

Error detected while processing function <SNR>46_Prosession:
line   34:
Vim(mksession):E190: Cannot open "/Users/danielburt/.vim/session/%Users%danielburt%development%app-orchestrator_^M  Touch ID  C02W9812HV2R  [*] Touch required after idle^[[K^[[64G  [^[[1;32;48m
OKAY^[[0m]  ^@Identities available via memento-agent:^@  Soft Key  asd9sd98Xsd  [S] %Users%danielburt%.ssh%id_rsa^@add_instance_type_validation.vim" for writing

I actually went into my /Users/danielburt/.vim/session/ folder and deleted anything with Touch ID in it. I'm actually not sure why those sessions are being created.

This is what I have in my .vimrc for vim-prosession:

" session management via obsession+prosession
" Set session to be name of git branch
let g:prosession_per_branch = 1

" https://github.com/dhruvasagar/vim-prosession/issues/50
" The following saves the last buffer viewed so that <leader><leader> or <c-^> works

function! s:preserve_alt_buffer()
  let l:alternate = fnameescape(expand('#'))
  if !empty(l:alternate)
    call system('echo "let @#=\"'.l:alternate.'\"" >> '.v:this_session)
  endif
endfunction

autocmd User Obsession call s:preserve_alt_buffer()

" augroup ProsessionPreserveAlt
"   au!

"   autocmd VimLeave * call s:preserve_alt_buffer()
" augroup END

shellslash breaks session filename generation in Windows

It's assuming that paths in Windows will always have backslashes:

function! s:undofile(cwd) "{{{1
  if has('win16') || has('win32') || has('win64')
    return substitute(a:cwd, '\', '%', 'g')
  else
    return substitute(a:cwd, '/', '%', 'g')
  endif
endfunction

Does it support windows?

I see my project dirs in ~/.vim/session. But when I want to switch to a project :Prosession myproject I got Directory myproject does not exists. How to solve it?

Prosession error on path containing a space

Repro steps

  1. Setup vim-prosession to be enabled via let g:prosession_on_startup = 1
  2. Start vim in path where a path component has a space, e.g. /Users/myuser/foo bar

Actual result
An error occurs:

Error detected while processing function <SNR>32_Prosession:
line   25:
E172: Only one file name allowed: Obsession /Users/whitley/.vim/sessions/index 1280__sha256__baa4d6cb6.vim

Expected result

Prosession starts Obsession as expected.

Notes

This is a filename quoting problem. PR incoming momentarily.

prosession_default_session usage unclear

I would like to set my default session to ~/Dropbox however it looks like in the help page the default value for prosession_default_session is 0. Does that imply that prosession_default_session is a Boolean that takes either 0 or 1?

Is there currently a way to define the location/path of my default session? The usage for this setting is unclear to me.

Thanks!

Can I exclude certain directories?

May I exclude certain directories from auto-loading/saving with Prosession? I host a personal wiki using Vimwiki and browse/edit files in ~/Wiki/Warehouse on an hourly basis. I prefer to disable Prosession completely for these files.

For now, vim +VimwikiMakeDiaryNote is not considered as a way of "starting Vim with an argument". The +VimwikiMakeDiaryNote flag is intended to open up the diary wiki of the day. However, after putting on vim-prosession, vim +VimwikiMakeDiaryNote will faithfully load what has been the last view of the session from a day before :)

I put the following line towards the end of my ~/.vimrc. It did not help. I guess sessions must have been sourced earlier?

autocmd BufRead,BufNewFile */Wiki/Warehouse/** let g:prosession_on_startup = 1

Thanks a lot!

Command to overwrite existing session file

First - thanks for writing this great plugin! It's awesome.

I had a feature request. Sometimes I have an existing "prosession" for a particular directory, and I want to replace it with a brand new session (that I opened with another vim in the same directory). To do this I need to find the corresponding session file and delete it which is a little cumbersome.

Perhaps you could add a "Prosession! " command that would forcibly overwrite this existing sesion file?

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.