Loading ...
Sorry, an error occurred while loading the content.

set runtimepath

Expand Messages
  • rail shafigulin
    I was trying to understand how runtimepath option works and was experimenting with it. I bumped onto a small problem. I set up my runtimepath and copy
    Message 1 of 7 , Nov 25, 2012
    • 0 Attachment
      I was trying to understand how runtimepath option works and was experimenting with it. I bumped onto a small problem.

      I set up my runtimepath and copy mycolor.vim file into it.  After I set my runtimepath, :set runtimepath=~/Projects/learningvimthehardway/colors, I run the color command, :color mycolor. I get the following message: E185: Cannot find color scheme mycolor.

      Does anybody know why it is doing it? I do see the file mycolor.vim in my  runtimepath directory. 

      Here is what I get when run mvim --version:

      IM - Vi IMproved 7.3 (2010 Aug 15, compiled Jan  2 2012 17:38:47)
      MacOS X (unix) version
      Included patches: 1-390
      Compiled by Bjorn Winckler <bjorn.winckler@...>
      Huge version with MacVim 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_gui +diff 
      +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi 
      +file_in_path +find_in_path +float +folding -footer +fork() +fullscreen 
      -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 +mouse_urxvt +multi_byte 
      +multi_lang -mzscheme +netbeans_intg +odbeditor +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 +transparency 
      +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace 
      +wildignore +wildmenu +windows +writebackup -X11 -xfontset +xim -xsmp 
      -xterm_clipboard -xterm_save 
         system vimrc file: "$VIM/vimrc"
           user vimrc file: "$HOME/.vimrc"
            user exrc file: "$HOME/.exrc"
        system gvimrc file: "$VIM/gvimrc"
          user gvimrc file: "$HOME/.gvimrc"
          system menu file: "$VIMRUNTIME/menu.vim"
        fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
      Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X_UNIX -no-cpp-precomp  -g -O2 -arch i386 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
      Linking: gcc   -L.    -L.         -arch i386 -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon      -lncurses  -liconv -framework Cocoa    -fstack-protector -L/usr/local/lib  -L/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -framework Python   -framework Ruby  

      --
      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
    • Marcin Szamotulski
      ... With your settings of the runtimepath you should place your color file in the directory: ~/Projects/learningvimthehardway/colors/colors The runtimepath
      Message 2 of 7 , Nov 25, 2012
      • 0 Attachment
        On 15:31 Sun 25 Nov , rail shafigulin wrote:
        > I was trying to understand how runtimepath option works and was
        > experimenting with it. I bumped onto a small problem.
        >
        > I set up my runtimepath and copy mycolor.vim file into it. After I set my
        > runtimepath, :set runtimepath=~/Projects/learningvimthehardway/colors, I
        > run the color command, :color mycolor. I get the following message: E185:
        > Cannot find color scheme mycolor.
        >
        > Does anybody know why it is doing it? I do see the file mycolor.vim in my
        > runtimepath directory.

        With your settings of the runtimepath you should place your color file
        in the directory: ~/Projects/learningvimthehardway/colors/colors

        The 'runtimepath' is a path to the parent directory of the subdirectories
        like plugin (where you put your plugins), ftplugin (where you put file
        type plugins), colors (for colors), etc ... You can read ":help
        'runtimepath'".

        Best,
        Marcin

        --
        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
      • cyboman
        ... Thanks. I appreciate the help. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying
        Message 3 of 7 , Nov 25, 2012
        • 0 Attachment
          On Sunday, November 25, 2012 4:22:52 PM UTC-5, coot_. wrote:
          > On 15:31 Sun 25 Nov , rail shafigulin wrote:
          >
          > > I was trying to understand how runtimepath option works and was
          >
          > > experimenting with it. I bumped onto a small problem.
          >
          > >
          >
          > > I set up my runtimepath and copy mycolor.vim file into it. After I set my
          >
          > > runtimepath, :set runtimepath=~/Projects/learningvimthehardway/colors, I
          >
          > > run the color command, :color mycolor. I get the following message: E185:
          >
          > > Cannot find color scheme mycolor.
          >
          > >
          >
          > > Does anybody know why it is doing it? I do see the file mycolor.vim in my
          >
          > > runtimepath directory.
          >
          >
          >
          > With your settings of the runtimepath you should place your color file
          >
          > in the directory: ~/Projects/learningvimthehardway/colors/colors
          >
          >
          >
          > The 'runtimepath' is a path to the parent directory of the subdirectories
          >
          > like plugin (where you put your plugins), ftplugin (where you put file
          >
          > type plugins), colors (for colors), etc ... You can read ":help
          >
          > 'runtimepath'".
          >
          >
          >
          > Best,
          >
          > Marcin

          Thanks. I appreciate the help.

          --
          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
        • Marc Weber
          ... Yes, but some special features are broken, such as loading ${RTP_ITEM}/after/plugin/*.vim files or its missing ftdetect files or such. Its not that likely
          Message 4 of 7 , Nov 25, 2012
          • 0 Attachment
            > The 'runtimepath' is a path to the parent directory of the subdirectories
            > like plugin (where you put your plugins), ftplugin (where you put file
            > type plugins), colors (for colors), etc ... You can read ":help
            > 'runtimepath'".
            Yes, but some special features are broken, such as loading
            ${RTP_ITEM}/after/plugin/*.vim files or its missing ftdetect files or such.
            Its not that likely that you hit them, but some plugins use those files.
            Yes - this could eventually be considered being a bug in Vim.

            I personally recommend using any of vim-addon-manager, pathogen, vundle
            to manage your runtimepath somewhat automatically. I personally prefer
            the first cause I started the project. vim-addon-manager also manages
            everything for you if you want to add pathes to runtimepath at runtime
            and it'll source plugin/*.vim files for you - thus you can load plugins
            only when you need them.

            As Marcin said reading Vim's help is a good starting point.

            How to use Vim's help efficiently:
            :h *chars*<c-d>, then jump to any match which looks like containing what
            you're looking for. Or helpgrep. All options are enclosed by ''. Thus to
            match all options :h '*'<c-d> etc.

            Marc Weber

            --
            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
          • Christian Brabandt
            ... Can you be more specific? What is the bug? regards, Christian -- You received this message from the vim_use maillist. Do not top-post! Type your reply
            Message 5 of 7 , Nov 26, 2012
            • 0 Attachment
              On Mon, November 26, 2012 04:37, Marc Weber wrote:
              > Yes, but some special features are broken, such as loading
              > ${RTP_ITEM}/after/plugin/*.vim files or its missing ftdetect files or
              > such.
              > Its not that likely that you hit them, but some plugins use those files.
              > Yes - this could eventually be considered being a bug in Vim.


              Can you be more specific? What is the bug?

              regards,
              Christian

              --
              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
            • Marc Weber
              ... I ve documented it now: (874e52), text: 50. VAM works around deficiencies in runtimepath *VAM-fixes-rtp* create these directories:
              Message 6 of 7 , Nov 26, 2012
              • 0 Attachment
                Excerpts from Christian Brabandt's message of Mon Nov 26 10:14:00 +0100 2012:
                > Can you be more specific? What is the bug?

                I've documented it now: (874e52), text:

                50. VAM works around deficiencies in runtimepath *VAM-fixes-rtp*

                create these directories:

                ~/.vim/after/plugin/1.vim
                ~/.vim/ftdetect/2.vim

                ~/my/after/plugin/3.vim
                ~/my/ftdetect/4.vim

                and add a line like this:
                echoe 'N.vim'

                ~/.vimrc contents:
                filetype on
                set rtp+=~/my

                Then you'll notice that you'll get two echoe lines only: 1.vim and 2.vim
                However some plugins use the 3.vim and 4.vim scheme, too

                VAM will source 3.vim and 4.vim for you, see vam#GlobThenSource usage


                Marc Weber

                --
                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
              • Gary Johnson
                ... The current behavior is what I would expect. You ve turned filetype detection on, which uses the value of rtp at the time, then you changed the value of
                Message 7 of 7 , Nov 26, 2012
                • 0 Attachment
                  On 2012-11-26, Marc Weber wrote:
                  > Excerpts from Christian Brabandt's message of Mon Nov 26 10:14:00 +0100 2012:
                  > > Can you be more specific? What is the bug?
                  >
                  > I've documented it now: (874e52), text:
                  >
                  > 50. VAM works around deficiencies in runtimepath *VAM-fixes-rtp*
                  >
                  > create these directories:
                  >
                  > ~/.vim/after/plugin/1.vim
                  > ~/.vim/ftdetect/2.vim
                  >
                  > ~/my/after/plugin/3.vim
                  > ~/my/ftdetect/4.vim
                  >
                  > and add a line like this:
                  > echoe 'N.vim'
                  >
                  > ~/.vimrc contents:
                  > filetype on
                  > set rtp+=~/my
                  >
                  > Then you'll notice that you'll get two echoe lines only: 1.vim and 2.vim
                  > However some plugins use the 3.vim and 4.vim scheme, too
                  >
                  > VAM will source 3.vim and 4.vim for you, see vam#GlobThenSource usage

                  The current behavior is what I would expect. You've turned filetype
                  detection on, which uses the value of 'rtp' at the time, then you
                  changed the value of 'rtp'. I would not expect filetype detection
                  to be using the new value of 'rtp'. The correct way to do that is

                  set rtp+=~/my
                  filetype on

                  If if hurts when you do that, ....

                  Regards,
                  Gary

                  --
                  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
                Your message has been successfully submitted and would be delivered to recipients shortly.