vim-notes icon indicating copy to clipboard operation
vim-notes copied to clipboard

Vim notes note working properly in 7.4

Open imranimtiazch opened this issue 10 years ago • 5 comments

Hi,

I have 7.4 version of Vim installed on Windows 7, however I'm having issues for vim not being able to detect vim-notes commands, for example:

When I create a new note (Using :Note) and change the title and type 3 astrisks, it detects 3 asterisks (ie. ***) and properly formats that in the middle of the screen but then when I reopen the file, it doesn't rename the file with the title that I gave earlier and also fails to properly align/detect the 3 astricksk (i.e., ***) also doesn't detect any other vim-notes commands.

The problem seems to be happening when I set g:notes_directories to a different path

let g:notes_directories=['C:\Users\administrator\My Documents\Notes\']

Thanks,

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 10 2013 14:38:33)
MS-Windows 32-bit GUI version with OLE support
Compiled by mool@tororo
Big version with GUI.  Features included (+) or not (-):
+arabic             +cursorshape        -hangul_input       +multi_byte_ime/dyn +scrollbind         +user_commands
+autocmd            +dialog_con_gui     +iconv/dyn          +multi_lang         +signs              +vertsplit
+balloon_eval       +diff               +insert_expand      -mzscheme           +smartindent        +virtualedit
+browse             +digraphs           +jumplist           +netbeans_intg      -sniff              +visual
++builtin_terms     -dnd                +keymap             +ole                +startuptime        +visualextra
+byte_offset        -ebcdic             +langmap            +path_extra         +statusline         +viminfo
+cindent            +emacs_tags         +libcall            +perl/dyn           -sun_workshop       +vreplace
+clientserver       +eval               +linebreak          +persistent_undo    +syntax             +wildignore
+clipboard          +ex_extra           +lispindent         -postscript         +tag_binary         +wildmenu
+cmdline_compl      +extra_search       +listcmds           +printer            +tag_old_static     +windows
+cmdline_hist       +farsi              +localmap           -profile            -tag_any_white      +writebackup
+cmdline_info       +file_in_path       -lua                +python/dyn         +tcl/dyn            -xfontset
+comments           +find_in_path       +menu               +python3/dyn        -tgetent            -xim
+conceal            +float              +mksession          +quickfix           -termresponse       -xterm_save
+cryptv             +folding            +modify_fname       +reltime            +textobjects        +xpm_w32
+cscope             -footer             +mouse              +rightleft          +title              
+cursorbind         +gettext/dyn        +mouseshape         +ruby/dyn           +toolbar            
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$HOME\vimfiles\vimrc"
 3rd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG   -DFEAT_XPM_W32   -DWINVER=0x0400 -D_WIN32_WINNT=0x0400  /Fo.\ObjGOLYHTRi386/ /Ox /GL -DNDEBUG  /Zl /MT -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl85.dll\" -DDYNAMIC_TCL_VER=\"8.5\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python32.dll\" -DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl514.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=19 -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby192.dll\" -DFEAT_BIG /Fd.\ObjGOLYHTRi386/ /Zi
Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib uuid.lib /machine:i386 /nodefaultlib gdi32.lib version.lib   winspool.lib comctl32.lib advapi32.lib shell32.lib  /machine:i386 /nodefaultlib libcmt.lib oleaut32.lib  user32.lib      /nodefaultlib:python27.lib /nodefaultlib:python32.lib   "E:\tcl\lib\tclstub85.lib" WSock32.lib xpm\x86\lib\libXpm.lib /PDB:gvim.pdb -debug

imranimtiazch avatar Jul 06 '15 10:07 imranimtiazch

Your description is a bit confusing...

When I create a new note (Using :Note) and change the title and type 3 astrisks, it detects 3 asterisks (ie. ***) and properly formats that in the middle of the screen

I'm following so far ...

but then when I reopen the file, it doesn't rename the file with the title that I gave earlier and also fails to properly align/detect the 3 astricksk (i.e., ***) also doesn't detect any other vim-notes commands.

Notes are given a filename when you save them, not when you open them (unless an inconsistency is detected, but your description doesn't imply so).

Nevertheless the problem seems clear: The automatic loading of the notes file type doesn't work as expected. Two suggestions for next steps:

  1. Did you try removing the trailing backslash from the example you gave, and is it still broken then?
  2. If so, please execute the Vim command :autocmd PluginNotes and copy/paste or include a screenshot of the output here. Most likely something goes wrong in the filename matching and this step may help to point out what exactly.

xolox avatar Jul 08 '15 17:07 xolox

Hi,

Here's the output of :autocmd PluginNotes.

Above, when I said "... when I reopen the file,..." I basically meant that after having saved the file, when then I do :RecentNotes and open the file, at that point Notes plugin is failing to highlight the syntax etc.

--- Auto-Commands ---
PluginNotes  BufRead
    *         call xolox#notes#refresh_syntax()
PluginNotes  BufReadCmd
    note:*    call xolox#notes#shortcut()
    C:/Users/IBM_ADMIN/vimfiles/misc/notes/shadow/*
              call xolox#notes#edit_shadow()
PluginNotes  BufUnload
    *         call xolox#notes#unload_from_cache()
PluginNotes  BufWritePost
    *         call xolox#notes#refresh_syntax()
PluginNotes  BufWriteCmd
    C:/Users/IBM_ADMIN/vimfiles/misc/notes/user/*
              call xolox#notes#save()
PluginNotes  InsertEnter
    *         call xolox#notes#refresh_syntax()
PluginNotes  InsertLeave
    *         call xolox#notes#refresh_syntax()
PluginNotes  CursorHold
    *         call xolox#notes#refresh_syntax()
PluginNotes  CursorHoldI
    *         call xolox#notes#refresh_syntax()
PluginNotes  SwapExists
    *         call xolox#notes#swaphack()

imranimtiazch avatar Jul 09 '15 09:07 imranimtiazch

Hi and thanks for the reply. I haven't used Windows in years, but I do immediately notice the two very different directory pathnames:

  1. In your first message you mentioned using the following line in your Vim configuration:

    let g:notes_directories=['C:\Users\administrator\My Documents\Notes\']
    
  2. The output you quoted in your last message includes two directory pathnames:

    • C:/Users/IBM_ADMIN/vimfiles/misc/notes/user
    • C:/Users/IBM_ADMIN/vimfiles/misc/notes/shadow

    These look like the defaults set by the vim-notes plugin, but there's no reference to the custom notes directory you configured.

Are you sure this is not the output when g:notes_directories isn't set?

xolox avatar Jul 15 '15 18:07 xolox

Hi,

My notes_directories is definitely set to: let g:notes_directories=['C:\Users\IBM_ADMIN\My Documents\Notes']

I've verified this by running: let g:notes_directories

May be that's could be the problem that the new variable for notes_directories isn't working as it should have?

imranimtiazch avatar Jul 29 '15 10:07 imranimtiazch

@xolox, first, thanks for your work!

Do you have an idea, what minimum version of vim is required, such that all the features work? Our Cluster is using something 7.2ish and a few things do not work (i.e. Tab indention, Folding...).

rscircus avatar Sep 30 '15 09:09 rscircus