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

New to Python

Expand Messages
  • kevin1
    Hello all, I am about to embark on a Python project... Usually I code in Java, C/C++, Perl, or PHP, and have been using C indenting for a while. What settings
    Message 1 of 4 , Oct 31, 2001
    • 0 Attachment
      Hello all,
      I am about to embark on a Python project...
      Usually I code in Java, C/C++, Perl, or PHP, and have been using C
      indenting for a while. What settings are best for python, and what
      would I do to a vim6 .vimrc to allow me to edit .py files using python
      settings and my current fave settings for the rest of my languages?






      --
      No one may be called "good" if they have had no chance to be bad...
    • C. Porter Bassett
      From: kevin1 , and what ... That one s easy. Put you python-specific commands in a python plugin in you ftplugin directory. Same
      Message 2 of 4 , Oct 31, 2001
      • 0 Attachment
        From: "kevin1" <kevin1@...>
        , and what
        > would I do to a vim6 .vimrc to allow me to edit .py files using python
        > settings and my current fave settings for the rest of my languages?

        That one's easy. Put you python-specific commands in a python plugin in you
        ftplugin directory. Same with any other file type.
      • Peoter Veliki
        ... you ... Can t you also use an autocommand that loads your python specific settings whenever you open a file with a *.py extension? HTML autocmd
        Message 3 of 4 , Nov 1, 2001
        • 0 Attachment
          > and what
          > > would I do to a vim6 .vimrc to allow me to edit .py files using python
          > > settings and my current fave settings for the rest of my languages?
          >
          > That one's easy. Put you python-specific commands in a python plugin in
          you
          > ftplugin directory. Same with any other file type.
          >
          >


          Can't you also use an autocommand that loads your python specific settings
          whenever you open a file with a *.py extension?


          " HTML
          autocmd BufNewFile,BufRead *.html so $VIMRUNTIME/../myconfigfiles/html.vim

          " Java
          autocmd BufNewFile,BufRead *.java so $VIMRUNTIME/../myconfigfiles/java.vim

          " JSP
          autocmd BufNewFile,BufRead *.jsp so $VIMRUNTIME/../myconfigfiles/html.vim
          autocmd BufNewFile,BufRead *.jsp so $VIMRUNTIME/../myconfigfiles/java.vim
          autocmd BufNewFile,BufRead *.jsp so $VIMRUNTIME/../myconfigfiles/jsp.vim
        • Benoit Cerrina
          ... Yes but this is already what is done trhought the filetype detection mechanism and ftplugins Benoit
          Message 4 of 4 , Nov 1, 2001
          • 0 Attachment
            >
            > Can't you also use an autocommand that loads your python specific settings
            > whenever you open a file with a *.py extension?
            >
            >
            > " HTML
            > autocmd BufNewFile,BufRead *.html so $VIMRUNTIME/../myconfigfiles/html.vim
            >
            > " Java
            > autocmd BufNewFile,BufRead *.java so $VIMRUNTIME/../myconfigfiles/java.vim
            >
            > " JSP
            > autocmd BufNewFile,BufRead *.jsp so $VIMRUNTIME/../myconfigfiles/html.vim
            > autocmd BufNewFile,BufRead *.jsp so $VIMRUNTIME/../myconfigfiles/java.vim
            > autocmd BufNewFile,BufRead *.jsp so $VIMRUNTIME/../myconfigfiles/jsp.vim
            >
            >
            Yes but this is already what is done trhought the filetype detection
            mechanism
            and ftplugins
            Benoit
          Your message has been successfully submitted and would be delivered to recipients shortly.