Sunday, May 22, 2011

Re: question about string expression evaluation / bug?

On May 22, 3:59 pm, Tim Chase <v...@tim.thechases.com> wrote:
>
> My first questions would be:
>
> 1) what *is* in your vimrc?
>
> 2) what's the output of ":version"?  This might also be checkable
> with ":echo 'xxx'>''" to see what it evals as.  Depending your
> version, you might be running with -eval set.  According to
> ":help no-eval-feature", items in an "if" block get ignored if
> your build doesn't include +eval
>
> -tim

Tim -- Thanks. vimrc and output from version is below. Was compiled
as 'Big version without GUI'. Most of the commands in vimrc are
related to VimOrganizer ftplugin, the plugin whose code I'm trying to
debug.

This particular function is confirmed to work fine in vim72 and vim73
on various versions of Windows and Linux. Just someone running an
ArchLinux install was having a strange problem and I traced it to
this.

-- Herb

--------------------------------------------------------------------------
"We don't really care about being vi compatible
set nocompatible

"Add filetype plugin to handle file-specific things well (mostly
Python
"indention)
filetype plugin indent on

"Add my color scheme (customized from peachpuff)
colorscheme aaron

"Enable syntax highlighting
if has("syntax")
syntax on
endif

set nocompatible " Use Vim defaults instead of 100% vi
compatibility
set backspace=indent,eol,start " more powerful backspacing

" Now we set some defaults for the editor
set history=50 " keep 50 lines of command line
history
set ruler " show the cursor position all the
time

" Suffixes that get lower priority when doing tab completion for
filenames.
" These are files we are not likely to want to edit or read.
set
suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc

" Set the colors on vimdiff to be sane
highlight DiffAdd term=reverse cterm=bold ctermbg=green ctermfg=white
highlight DiffChange term=reverse cterm=bold ctermbg=cyan
ctermfg=black
highlight DiffText term=reverse cterm=bold ctermbg=gray ctermfg=black
highlight DiffDelete term=reverse cterm=bold ctermbg=red ctermfg=black

if has('gui_running')
" Make shift-insert work like in Xterm
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
endif

"aliases for oft-mistyped commands
ca WQ wq
ca Wq wq
ca W w

" make g] go to a tag if there's only one match, and present a menu if
more
" than one (why isn't this default?)
ca ts tj
ca tselect tjump

"Tell vim to search upwards in directories, searching for a ctags file
set tags=ctags;/

"==== Begin VimOrganizer Settings ====
" use this colorscheme or integrate it into an existing colorscheme
colorscheme org_dark
" guioption -L removes left scrollbar, which is especially
" irritating when split vertical windows appear in VimOrganizer
set guioptions-=L
" g:org_agenda_dirs specify directories that, along with
" their subtrees, are searched for list of .org files when
" accessing EditAgendaFiles(). Specify your own here, otherwise
" default will be for g:org_agenda_dirs to hold single
" directory which is directory of the first .org file opened
" in current Vim instance:
" Below is line I use in my Windows install:
"let g:org_agenda_dirs=["c:/users/herbert/documents/my\ dropbox","c:/
users/herbert/desktop"]
let g:agenda_files = [ '/home/aclindsa/Dropbox/todo.org' ]

" vars below are used to define default Todo list and
" default Tag list. Will be changed in near future so
" that these are defined by config lines in each .org
" file itself, but now these are where you can change things:
let g:org_todo_setup= 'TODO | DONE'
" while g:org_tag_setup is itself a string
let g:org_tag_setup='{@home(h) @work(w) @tennisclub(t)} \n {easy(e)
hard(d)} \n {computer(c) phone(p)}'

" leave these as is:
au! BufRead,BufWrite,BufWritePost,BufNewFile *.org
au BufRead,BufNewFile *.org call org#SetOrgFileType()
au BufRead *.org :PreLoadTags
au BufWrite *.org :PreWriteTags
au BufWritePost *.org :PostWriteTags

" below are two examples of Org-mode "hook" functions
" These present opportunities for end-user customization
" of how VimOrganizer works. For more info see the
" documentation for hooks in Emacs' Org-mode documentation:
" http://orgmode.org/worg/org-configs/org-hooks.php#sec-1_40

" These two hooks are currently the only ones enabled in
" the VimOrganizer codebase, but they are easy to add so if
" there's a particular hook you want go ahead and request it
" or look for where these hooks are implemented in
" /ftplugin/org.vim and use them as example for placing your
" own hooks in VimOrganizer:
function! Org_property_changed_functions(line,key, val)
"call confirm("prop changed: ".a:line."--key:".a:key."
val:".a:val)
endfunction
function! Org_after_todo_state_change_hook(line,state1, state2)
"call ConfirmDrawer("LOGBOOK")
"let str = ": - State: " . Pad(a:state2,10) . " from: " .
Pad(a:state1,10) .
" \ ' [' . Timestamp() . ']'
"call append(line("."), repeat('
',len(matchstr(getline(line(".")),'^\s*'))) . str)

endfunction

"==== End VimOrganizer Settings ====
"--------------------------------------------------------------------------------------
"end of vimrc

----------------------------------------------------------------------------------
output from version below:
---------------------------------------------------------------------------------


VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 8 2011 22:46:20)
Included patches: 1-177
Compiled by ArchLinux
Big version without GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset
+cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info
+comments
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff
+digraphs
-dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi
+file_in_path
+find_in_path +float +folding -footer +fork() +gettext -hangul_input
+iconv
+insert_expand +jumplist +keymap +langmap +libcall +linebreak
+lispindent
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -
mouseshape
+mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
+mouse_xterm +multi_byte +multi_lang -mzscheme -netbeans_intg -
osfiletype
+path_extra +perl +persistent_undo +postscript +printer -profile -
python
-python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs
+smartindent
-sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse
+textobjects +title
-toolbar +user_commands +vertsplit +virtualedit +visual +visualextra
+viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -
xim -xsmp
-xterm_clipboard -xterm_save
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/usr/local/
include -march=x86-64 -mtune=generic -O2 -pipe -
D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,--
hash-style=gnu -Wl,--as-needed -L/usr/local/lib -Wl,--as-needed -o
vim -lm -lncurses -lacl -lattr -lgpm -ldl -Wl,-E -Wl,-rpath,/
usr/lib/perl5/core_perl/CORE -fstack-protector -L/usr/local/lib -L/
usr/lib/perl5/core_perl/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -
lpthread -lc

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment