Closed zordsdavini closed 8 years ago
Could you try adding set hidden
to your .vimrc
?
That's the case. It helped.Thanks @mtth :+1:
Sorry for reopening, but as I understand if scratch is the last unsaved buffer, it should be closed without saving, am I right? In my case it gives:
Do you have set nocompatible
in your .vimrc
? Could you paste the version of Vim you are using and your full configuration here?
yes, it is (at the end of file): https://github.com/zordsdavini/dotfiles/blob/master/vimrc
and vim version: https://github.com/zordsdavini/dotfiles/blob/master/vim_version
I suspect that this is caused by these lines in your .vimrc
:
try
set switchbuf=usetab
set stal=2
catch
endtry
Could you try commenting these out? If this doesn't work, could you comment the pathogen#infect
line as well?
it looks like problem is solved. Even I reverted changes with this try... I got it working. Maybe last time have not fully restarted vim. Nice job, thank you, @mtth
Hi Matthieu,
First off, thank you for the plugin. It is very useful and the key binding makes using it lightning fast.
I however does not manage to make autohide work. When I go to another window I do not have an error but the scratch buffer does not hide.
My vimrc and the output of vim --version
.
vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 21 2016 11:35:58)
MacOS X (unix) version
Included patches: 1-1589
Compiled by Homebrew
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +tag_binary
+arabic +file_in_path +mouse_sgr +tag_old_static
+autocmd +find_in_path -mouse_sysmouse -tag_any_white
-balloon_eval +float +mouse_urxvt -tcl
-browse +folding +mouse_xterm +terminfo
++builtin_terms -footer +multi_byte +termresponse
+byte_offset +fork() +multi_lang +textobjects
+channel -gettext -mzscheme +timers
+cindent -hangul_input +netbeans_intg +title
-clientserver +iconv +packages -toolbar
+clipboard +insert_expand +path_extra +user_commands
+cmdline_compl +job +perl +vertsplit
+cmdline_hist +jumplist +persistent_undo +virtualedit
+cmdline_info +keymap +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak +python +vreplace
+cscope +lispindent -python3 +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con -lua +rightleft +writebackup
+diff +menu +ruby -X11
+digraphs +mksession +scrollbind -xfontset
-dnd +modify_fname +signs -xim
-ebcdic +mouse +smartindent -xsmp
+emacs_tags -mouseshape +startuptime -xterm_clipboard
+eval +mouse_dec +statusline -xterm_save
+ex_extra -mouse_gpm -sun_workshop -xpm
+extra_search -mouse_jsbterm +syntax
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H -F/usr/local/Frameworks -DMACOS_X_UNIX -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.10 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /usr/bin/clang -L. -L/Users/ebouchut/.rbenv/versions/2.0.0-p353/lib -fstack-protector -L/usr/local/lib -F/usr/local/Frameworks -Wl,-headerpad_max_install_names -o vim -lm -lncurses -liconv -framework Cocoa -fstack-protector -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -F/usr/local/Cellar/python/2.7.11/Frameworks -framework Python -lruby-static -lobjc -L/Users/ebouchut/.rbenv/versions/2.0.0-p353/lib
The result of :echo g:scratch_autohide
is 1
and I have set hidden.
Any ideas would could be the cause of this issue?
@ebouchut - I don't see anything obvious in your configuration that would conflict. Could you disable your plugins and see if it works then?
Thank you for the feedback. Sure, I will do that and let you know.
For whatever reason it works now. Probably due to a configuration change on my side or I did not reloaded things correctly. Thanks.
@ebouchut - great; thanks for the update!
.vimrc
I just open Scratch by "gs", enter text and ESC – it goes back to my document and trying to close (hide) scratch, but I get error