Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Windows vim and Cygwin vim #85

Closed
raghur opened this issue Feb 25, 2014 · 3 comments
Closed

Question: Windows vim and Cygwin vim #85

raghur opened this issue Feb 25, 2014 · 3 comments

Comments

@raghur
Copy link

raghur commented Feb 25, 2014

Hi,
First of all thanks for the great plugin. I've recently started using both windows gvim and cygwin vim and obviously the session plugin barfs since the filepaths are no longer loadable.
I've resorted to disabling vim-session in Cygwin. However, wanted to check if you'd be willing to consider implementing something like this in the plugin

  1. in the session file, store the os on which it was created (win32 or win32unix)
  2. while loading, only load last saved session if the os matches
  3. If it doesn't then load last saved session for the OS?

My vimscript fu is extremely limited - hence the request. If you think its too esoteric, then I completely understand :)

@xolox
Copy link
Owner

xolox commented Jul 7, 2014

Hi and sorry for the late response.

Disclaimer: I've never actually used Cygwin, however I am pretty experienced in both Windows and UNIX and I know how Cygwin is supposed to give you an emulated UNIX environment on Windows.

With that out of the way: I don't really get how you can run into this issue with a 'default setup'. Vim on Windows will load ~\_vimrc while Cygwin Vim should load ~/.vimrc. Same goes for the profile directories ~\vimfiles vs ~/.vim. So the session directories wouldn't be shared by default, would they? Or am I misunderstanding how Cygwin works?

If I were using Cygwin I would have both Windows Vim and Cygwin Vim ultimately load the same vimrc file using Vim's :source command (my vimrc is a couple thousand lines and portable between Windows, Linux and Mac OS X so I certainly wouldn't want to repeat that for each platform and keep the files in sync manually) but I would use the platform specific vimrc scripts to set platform specific settings, for example I would set the session_directory option to different values for Windows Vim vs Cygwin Vim.

You wouldn't be able to share the sessions between both environments, but that will never work anyway (given how the vim-session plug-in works) so you're not really missing out on anything :-)

If this helps I could add a note to the readme explaining this setup. What do you think?

@raghur
Copy link
Author

raghur commented Jul 8, 2014

I'm using the same vimrc file for both windows gvim and cygwin vim. But your post did help out...

for example I would set the session_directory option to different values for Windows Vim vs Cygwin Vim.

I hadn't dug into that - so yeah - that'll work pretty well.. Will try it out.

xolox added a commit to xolox/vim-notes that referenced this issue Nov 11, 2014
@xolox
Copy link
Owner

xolox commented Nov 11, 2014

Thanks for the follow up @raghur, I added a note to the readme / homepage to make it easier for others to find out how to deal with this. Thanks for the feedback and happy Vimming!

@xolox xolox closed this as completed Nov 11, 2014
xolox added a commit that referenced this issue Nov 1, 2015
jessonfoo added a commit to jessonfoo/dotfiles that referenced this issue Jun 24, 2019
Merge pull request #374 from easymotion/reviewdog

CI: run vint with reviewdog
Moved styles into their own css file.

It's a bit of a phaff to find the path to the CSS file. The method I'm
using works when the markdown-preview plugin is loaded with
Pathogen.vim, but I'm not sure if it will work if the plugin is loaded
the traditional way.
Second attempt to fix YouCompleteMe issue (#92)

Squashed from two commits:

* Second attempt to fix YouCompleteMe issue

* VimEnter also has to be ignored
Fix blank lines issue

In #254, probably because the tag is followed by <CR>, cstta<CR> sets
regtype 'V'(linewise) though its keeper doesn't end with <CR>.  And
setreg() adds extra <CR> at @".  Remove this extra <CR> and fix adding
<CR> method.
Version 1.1.1: debug (stop beeping)
explicitly set locale to C for sorting so README sorts same on all systems (#348)

back to boooring
Documentation update part 2: content
Merge branch 'revert-marks'

Close gh-59.
Merge pull request #3 from joekur/support-js-jsx

Support for js and jsx specs
Merge pull request #190 from hhatto/improve-managepy

improve manage.py completion #188
Remove trailing slash from auto-closing tags (#1081)

This breaks compatibility with XHTML (see #845).
The slashes are even forbidden in HTML4 (but optional in HTML5).
Source: <http://xahlee.info/js/html5_non-closing_tag.html>
Merge pull request #7 from assaflavie/master

copy paste error fixed in readme
README: document that ZSH 4.3 or newer is required

closes #24
Try to fix issue #17 (async command execution on Windows without DLL)

See issue 17 on GitHub:
  xolox/vim-misc#17
Add doc/tags to git ignores.
Merge pull request #125 from acatton/fix-121

Fix #121: sudo syntax highlighting incorrectly
Mention that a new window will be opened for :NR! if hidden is not set
Merge pull request #55 from ldong/master

Added only use file_line upon files not directory
Merge pull request #10 from sheerun/patch-1

Set proper comment string on tmux.conf
Rust closures with bracket counting
Version 070503: Fixed problem with 'smartcase'. Checksum 726910263
Manual: update URL for foodcritic.
Merge pull request #31 from boatrite/zb-fix-describe

Highlight describe in RSpec.describe
Add a help tag for :Tabularize

Fixes #45
Add copyright notice and vim license
Create the Normal highlight if it doesn't exist

This can happen in versions of vim built without X support, like vim.nox
in Debian.

Fixes #9
Merge pull request #851 from xTire/master

Fix misspellings in README_ZH_CN.md
Merge branch 'prepare-for-0.3.3'
Document usage of multiple platforms (issue #85)

See also issue #85 on GitHub:
  xolox/vim-session#85
Merge pull request #1 from taybin/patch-1

use function! instead of function
Fix :0Dispatch

Closes tpope/vim-rake#36
Version 1.13

Use a defaultdict for easier appending.
Pass around dir for found tags file for better integration with fugitive (thanks to Markus Bertheau).
Remove mapping of @

This key should not be stolen! It's used for macros and YR does
something bad with it, causing us to have to hit enter to use the
macro.
Merge branch 'marabesi-master'

* marabesi-master:
  Use bash syntax highlighting for terminal commands in the readme
  Add empty lines after fenced code blocks
  Update README.markdown
gitcommit: use string width not character count
Merge pull request #605 from jsit/jsit/css-min-keyword-604

Change css, scss, and sass Omni input pattern to match min_keyword_length
delete global functions after the test case
Version 1.52

- FIX: Correct forward-to-end motion over lowercase part in "lowerCamel". Found this by chance in GitHub fork by Kevin Lee (bkad).
- BUG: Correct wrong stop on second letter of ACRONYM at the beginning of a word "AXBCText".
- The motion functionality is automatically tested via a runVimTests (vimscript #2565) test suite.
update zshenv
Add skip_forgery_protection to syntax highlighting
Improve parser version documentation

See #248.
Merge pull request #670 from jteplitz602/jteplitz602-readme

Update README.md to reflect project status
Use real visual mode mappings.

The normal mode mappings that start with "v" introduce a mapping delay when entering visual mode; this is irritating. Instead, define the mappings directly in visual mode, and disregard the previous selection with <C-u> prepended to the function call, so it works the same.
docs
fix last commit. Thanks to z0rc
Merge pull request #7 from BurningLutz/master

support async modifier
Remove FugitiveGenerate() in favor of FugitiveFind()
Version 0.6: Initial upload
Updated documentation
Fix PATH string building (#10)

References tpope/vim-rvm#5
Force sort to recalculate the cached sortKey. (#898)

* Force sort to recalculate the cached sortKey.

The problem in issue #880 was caused by the sort using the old sortKey.
For example, given nodes A, B, and C, if B were renamed to D, the sort
was still using B as its sortKey, thus not moving it.

It's a bit of a hack, but if we set g:NERDTreeOldSortOrder to an empty
list, the cached sortKey will be recalculated. I did the same thing for
both the Copy and Add functions as well.

* Add a comment to explain the let ... = [] statement.
Restore legacy maps
Update README.md
Version 1.13.2

Another bug fix:  either 1.13 or 1.13.1 broke the behavior of finding a matching construct that starts after the cursor.
Add deprecation notice
Merge pull request #34 from Jagua/fix-built-in-function-check

fix method for detecting whether exists built-in function.
SneakEnter, SneakLeave events

closes #128
fix replacing Namespace::Exception => ex
Merge branch 'master' of github:xsunsmile/showmarks
Only define <Leader>* mappings if available

If user has defined <Leader>* mappings in their vimrc, the mappings here
won't apply.
YAML has meaningful indentation.
Merge pull request #230 from Hinidu/patch-1

Support for the terraform filetype
Merge branch 'prepare-for-0.0.4'
Merge branch 'prepare-for-0.4.0'
Merge pull request #221 from thinca/remove-autocmd

Remove unnecessary autocmd
update vimup
Merge pull request #7 from joshuacronemeyer/master

support for v3 iterm applescript dictionary changes
Version 12

* changed conc -> cole for vim 7.3's built-in conceal mode
* included some additional escape sequences
Improve visual select to retain code highlighting colors
Version 2.0

removed "'echo hi'" from the script.

added rake to the gemfile as it is needed by travis
Merge pull request #20 from BrandonMathis/master

Tripple ` for named markdownCodeDelimiter
Note terminal mode incompatability
Add support for alternative real path API
Merge pull request #260 from aschrab/command-window

Do setup for command windows
Updates output
Remove outdated plugin references
add CTRL-M for multi-line markdown code snippets
Set and unset completeopt in htmlEn and htmlDis

Fucking Bitbucket
Merge pull request #26 from bovine3dom/master

Ensure Cygwin uses cygstart rather than *-open
Handle case where global Func() exists

Closes tpope/vim-abolish#68
Simplify regex using \k

Signed-off-by: jesson Foo <jessonfoo@gmail.com>
jessonfoo added a commit to jessonfoo/dotfiles that referenced this issue Jun 24, 2019
Merge pull request #374 from easymotion/reviewdog

CI: run vint with reviewdog
Moved styles into their own css file.

It's a bit of a phaff to find the path to the CSS file. The method I'm
using works when the markdown-preview plugin is loaded with
Pathogen.vim, but I'm not sure if it will work if the plugin is loaded
the traditional way.
Second attempt to fix YouCompleteMe issue (#92)

Squashed from two commits:

* Second attempt to fix YouCompleteMe issue

* VimEnter also has to be ignored
Fix blank lines issue

In #254, probably because the tag is followed by <CR>, cstta<CR> sets
regtype 'V'(linewise) though its keeper doesn't end with <CR>.  And
setreg() adds extra <CR> at @".  Remove this extra <CR> and fix adding
<CR> method.
Version 1.1.1: debug (stop beeping)
explicitly set locale to C for sorting so README sorts same on all systems (#348)

back to boooring
Documentation update part 2: content
Merge branch 'revert-marks'

Close gh-59.
Merge pull request #3 from joekur/support-js-jsx

Support for js and jsx specs
Merge pull request #190 from hhatto/improve-managepy

improve manage.py completion #188
Remove trailing slash from auto-closing tags (#1081)

This breaks compatibility with XHTML (see #845).
The slashes are even forbidden in HTML4 (but optional in HTML5).
Source: <http://xahlee.info/js/html5_non-closing_tag.html>
Merge pull request #7 from assaflavie/master

copy paste error fixed in readme
README: document that ZSH 4.3 or newer is required

closes #24
Try to fix issue #17 (async command execution on Windows without DLL)

See issue 17 on GitHub:
  xolox/vim-misc#17
Add doc/tags to git ignores.
Merge pull request #125 from acatton/fix-121

Fix #121: sudo syntax highlighting incorrectly
Mention that a new window will be opened for :NR! if hidden is not set
Merge pull request #55 from ldong/master

Added only use file_line upon files not directory
Merge pull request #10 from sheerun/patch-1

Set proper comment string on tmux.conf
Rust closures with bracket counting
Version 070503: Fixed problem with 'smartcase'. Checksum 726910263
Manual: update URL for foodcritic.
Merge pull request #31 from boatrite/zb-fix-describe

Highlight describe in RSpec.describe
Add a help tag for :Tabularize

Fixes #45
Add copyright notice and vim license
Create the Normal highlight if it doesn't exist

This can happen in versions of vim built without X support, like vim.nox
in Debian.

Fixes #9
Merge pull request #851 from xTire/master

Fix misspellings in README_ZH_CN.md
Merge branch 'prepare-for-0.3.3'
Document usage of multiple platforms (issue #85)

See also issue #85 on GitHub:
  xolox/vim-session#85
Merge pull request #1 from taybin/patch-1

use function! instead of function
Fix :0Dispatch

Closes tpope/vim-rake#36
Version 1.13

Use a defaultdict for easier appending.
Pass around dir for found tags file for better integration with fugitive (thanks to Markus Bertheau).
Remove mapping of @

This key should not be stolen! It's used for macros and YR does
something bad with it, causing us to have to hit enter to use the
macro.
Merge branch 'marabesi-master'

* marabesi-master:
  Use bash syntax highlighting for terminal commands in the readme
  Add empty lines after fenced code blocks
  Update README.markdown
gitcommit: use string width not character count
Merge pull request #605 from jsit/jsit/css-min-keyword-604

Change css, scss, and sass Omni input pattern to match min_keyword_length
delete global functions after the test case
Version 1.52

- FIX: Correct forward-to-end motion over lowercase part in "lowerCamel". Found this by chance in GitHub fork by Kevin Lee (bkad).
- BUG: Correct wrong stop on second letter of ACRONYM at the beginning of a word "AXBCText".
- The motion functionality is automatically tested via a runVimTests (vimscript #2565) test suite.
update zshenv
Add skip_forgery_protection to syntax highlighting
Improve parser version documentation

See #248.
Merge pull request #670 from jteplitz602/jteplitz602-readme

Update README.md to reflect project status
Use real visual mode mappings.

The normal mode mappings that start with "v" introduce a mapping delay when entering visual mode; this is irritating. Instead, define the mappings directly in visual mode, and disregard the previous selection with <C-u> prepended to the function call, so it works the same.
docs
fix last commit. Thanks to z0rc
Merge pull request #7 from BurningLutz/master

support async modifier
Remove FugitiveGenerate() in favor of FugitiveFind()
Version 0.6: Initial upload
Updated documentation
Fix PATH string building (#10)

References tpope/vim-rvm#5
Force sort to recalculate the cached sortKey. (#898)

* Force sort to recalculate the cached sortKey.

The problem in issue #880 was caused by the sort using the old sortKey.
For example, given nodes A, B, and C, if B were renamed to D, the sort
was still using B as its sortKey, thus not moving it.

It's a bit of a hack, but if we set g:NERDTreeOldSortOrder to an empty
list, the cached sortKey will be recalculated. I did the same thing for
both the Copy and Add functions as well.

* Add a comment to explain the let ... = [] statement.
Restore legacy maps
Update README.md
Version 1.13.2

Another bug fix:  either 1.13 or 1.13.1 broke the behavior of finding a matching construct that starts after the cursor.
Add deprecation notice
Merge pull request #34 from Jagua/fix-built-in-function-check

fix method for detecting whether exists built-in function.
SneakEnter, SneakLeave events

closes #128
fix replacing Namespace::Exception => ex
Merge branch 'master' of github:xsunsmile/showmarks
Only define <Leader>* mappings if available

If user has defined <Leader>* mappings in their vimrc, the mappings here
won't apply.
YAML has meaningful indentation.
Merge pull request #230 from Hinidu/patch-1

Support for the terraform filetype
Merge branch 'prepare-for-0.0.4'
Merge branch 'prepare-for-0.4.0'
Merge pull request #221 from thinca/remove-autocmd

Remove unnecessary autocmd
update vimup
Merge pull request #7 from joshuacronemeyer/master

support for v3 iterm applescript dictionary changes
Version 12

* changed conc -> cole for vim 7.3's built-in conceal mode
* included some additional escape sequences
Improve visual select to retain code highlighting colors
Version 2.0

removed "'echo hi'" from the script.

added rake to the gemfile as it is needed by travis
Merge pull request #20 from BrandonMathis/master

Tripple ` for named markdownCodeDelimiter
Note terminal mode incompatability
Add support for alternative real path API
Merge pull request #260 from aschrab/command-window

Do setup for command windows
Updates output
Remove outdated plugin references
add CTRL-M for multi-line markdown code snippets
Set and unset completeopt in htmlEn and htmlDis

Fucking Bitbucket
Merge pull request #26 from bovine3dom/master

Ensure Cygwin uses cygstart rather than *-open
Handle case where global Func() exists

Closes tpope/vim-abolish#68
Simplify regex using \k

Signed-off-by: jesson Foo <jessonfoo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants