80e85654e5cb

Use python-mode.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 18 Nov 2011 09:37:17 -0500
parents b5e60ade957d
children 25d5eafb3add
branches/tags (none)
files .hgsub .hgsubstate vim/.vimrc vim/sadness/ropevim/install_ropevim.sh vim/sadness/ropevim/pylibs/rope vim/sadness/ropevim/pylibs/ropemode vim/sadness/ropevim/pylibs/ropevim.py vim/sadness/sadness.vim

Changes

--- a/.hgsub	Thu Nov 10 10:33:30 2011 -0500
+++ b/.hgsub	Fri Nov 18 09:37:17 2011 -0500
@@ -13,9 +13,9 @@
 vim/bundle/vim-javascript = [git]git://github.com/pangloss/vim-javascript.git
 vim/bundle/strftimedammit = [hg]http://bitbucket.org/sjl/strftimedammit.vim/
 vim/bundle/easymotion = [git]git://github.com/Lokaltog/vim-easymotion.git
-vim/bundle/pydoc = [git]git://github.com/sjl/pydoc.vim.git
 vim/bundle/ctrlp = [git]git://github.com/kien/ctrlp.vim.git
 vim/bundle/vim-orgmode = [git]git://github.com/jceb/vim-orgmode.git
+vim/bundle/python-mode = [git]git://github.com/sjl/python-mode.git
 vim/bundle/slimv = [hg]http://bitbucket.org/sjl/slimv
 vim/bundle/threesome = [hg]http://bitbucket.org/sjl/threesome.vim
 vim/bundle/vim-makegreen = [git]git://github.com/sjl/vim-makegreen.git
@@ -30,8 +30,4 @@
 vim/bundle/rainbow-parentheses = [git]git://github.com/kien/rainbow_parentheses.vim.git
 vim/bundle/AnsiEsc.vim = [git]git://github.com/vim-scripts/AnsiEsc.vim.git
 
-vim/sadness/ropevim/src/rope = [hg]https://bitbucket.org/agr/rope/
-vim/sadness/ropevim/src/ropemode = [hg]https://bitbucket.org/agr/ropemode/
-vim/sadness/ropevim/src/ropevim = [hg]https://bitbucket.org/agr/ropevim/
-
 keymando/Plugins/abbrev = [git]git://github.com/keymando/abbrev.git
--- a/.hgsubstate	Thu Nov 10 10:33:30 2011 -0500
+++ b/.hgsubstate	Fri Nov 18 09:37:17 2011 -0500
@@ -13,7 +13,7 @@
 34e28b3f6f6d702ff2963b8196eccae9344ed4bc vim/bundle/markdown
 2dd198c6c412b4ddd361b43586b01981e8383239 vim/bundle/nerdtree
 b7889db57c90824ff5092da4fdde9e05689f24fa vim/bundle/nosecompiler
-a0831b09f2026c3a3d52e253ffd139fe20a9360a vim/bundle/pydoc
+5a79d14e3979dd03e979ec3719970a030537d445 vim/bundle/python-mode
 fa3563dda862c1dc46ddac32d8a9f939e9077379 vim/bundle/rainbow-parentheses
 fbc884de41302bb08b93b9d4d9c6921248a31a4c vim/bundle/slimv
 c6197a10ace82e0fe0c08e5cf5c017b7069a978e vim/bundle/sparkup
@@ -29,6 +29,3 @@
 f21fbd8759d7fa6c3cb1bbb9fe05eae90422f01a vim/bundle/vim-makegreen
 54b7bfc8170f3fa1519e5559c37a4f3e31c032c9 vim/bundle/vim-orgmode
 b0ee6ec2153c5f30827d67db1668f37a975a1005 vim/bundle/vim-speeddating
-bd22278f36bbda016951784cd99657f4a3d7cc81 vim/sadness/ropevim/src/rope
-584d3eba7ca67942588848a0911145778075cf1f vim/sadness/ropevim/src/ropemode
-6d27262305a8c0ba6834ba9563f75d2f8ebb9a3a vim/sadness/ropevim/src/ropevim
--- a/vim/.vimrc	Thu Nov 10 10:33:30 2011 -0500
+++ b/vim/.vimrc	Fri Nov 18 09:37:17 2011 -0500
@@ -174,6 +174,9 @@
 call MakeSpacelessIabbrev('ghs/', 'http://github.com/sjl/')
 
 iabbrev ldis ಠ_ಠ
+iabbrev lsad ಥ_ಥ
+iabbrev lhap ಥ‿ಥ
+
 iabbrev sl@ steve@stevelosh.com
 iabbrev vrcf `~/.vimrc` file
 
@@ -603,14 +606,14 @@
 augroup ft_python
     au!
 
-    au Filetype python noremap  <buffer> <localleader>rr :RopeRename<CR>
-    au Filetype python vnoremap <buffer> <localleader>rm :RopeExtractMethod<CR>
-    au Filetype python noremap  <buffer> <localleader>ri :RopeOrganizeImports<CR>
-
-    au FileType python setlocal omnifunc=pythoncomplete#Complete
+    " au FileType python setlocal omnifunc=pythoncomplete#Complete
     au FileType python setlocal define=^\s*\\(def\\\\|class\\)
     au FileType python compiler nose
     au FileType man nnoremap <buffer> <cr> :q<cr>
+    
+    " Jesus tapdancing Christ, built-in Python syntax, you couldn't let me
+    " override this in a normal way, could you?
+    au FileType python if exists("python_space_error_highlight") | unlet python_space_error_highlight | endif
 augroup END
 
 " }}}
@@ -997,12 +1000,38 @@
 let g:org_debug = 1
 
 " }}}
-" Pydoc {{{
+" Python-Mode {{{
+
+let g:pymode_doc = 1
+let g:pymode_doc_key = '<localleader>ds'
+let g:pydoc = 'pydoc'
+let g:pymode_syntax = 0
+let g:pymode_run = 0
+let g:pymode_lint = 0
+let g:pymode_breakpoint = 0
+let g:pymode_utils_whitespaces = 0
+let g:pymode_virtualenv = 1
+
+let g:pymode_options_indent = 0
+let g:pymode_options_fold = 0
+let g:pymode_options_other = 0
 
-let g:pydoc_perform_mappings = 0
-
-au FileType python noremap <buffer> <localleader>ds :call ShowPyDoc('<C-R><C-W>', 1)<CR>
-au FileType python noremap <buffer> <localleader>dS :call ShowPyDoc('<C-R><C-A>', 1)<CR>
+let g:pymode_rope = 1
+let g:pymode_rope_global_prefix = "<localleader>R"
+let g:pymode_rope_local_prefix = "<localleader>r"
+let g:pymode_rope_auto_project = 1
+let g:pymode_rope_enable_autoimport = 0
+let g:pymode_rope_autoimport_generate = 1
+let g:pymode_rope_autoimport_underlineds = 0
+let g:pymode_rope_codeassist_maxfixes = 10
+let g:pymode_rope_sorted_completions = 1
+let g:pymode_rope_extended_complete = 1
+let g:pymode_rope_autoimport_modules = ["os", "shutil", "datetime"]
+let g:pymode_rope_confirm_saving = 1
+let g:pymode_rope_vim_completion = 1
+let g:pymode_rope_guess_project = 1
+let g:pymode_rope_goto_def_newwin = 0
+let g:pymode_rope_always_show_complete_menu = 0
 
 " }}}
 " Rainbox Parentheses {{{
@@ -1030,15 +1059,6 @@
 
 
 " }}}
-" Rope {{{
-
-let ropevim_enable_shortcuts = 0
-let ropevim_guess_project = 1
-let ropevim_global_prefix = '<C-c>p'
-
-source $HOME/.vim/sadness/sadness.vim
-
-" }}}
 " Scratch {{{
 
 command! ScratchToggle call ScratchToggle()
--- a/vim/sadness/ropevim/install_ropevim.sh	Thu Nov 10 10:33:30 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-#!/bin/bash
-
-# Plant rope vim's plugin
-# This is a script to install or update 'ropevim'
-# Copyright Alexander Artemenko, 2008
-# Contact me at svetlyak.40wt at gmail com
-
-function create_dirs
-{
-    mkdir -p src
-    mkdir -p pylibs
-}
-
-function check_vim
-{
-    if vim --version | grep '\-python[^3]' > /dev/null
-    then
-        echo You vim does not support python plugins.
-        echo Please, install vim with python support.
-        echo On debian or ubuntu you can do this:
-        echo "    sudo apt-get install vim-python"
-        exit 1
-    fi
-}
-
-function get_or_update
-{
-    if [ -e $1 ]
-    then
-        cd $1
-        echo Pulling updates from $2
-        hg pull > /dev/null
-        cd ..
-    else
-        echo Cloning $2
-        hg clone $2 $1 > /dev/null
-    fi
-}
-
-function pull_sources
-{
-    cd src
-    get_or_update rope http://bitbucket.org/agr/rope
-    get_or_update ropevim http://bitbucket.org/agr/ropevim
-    get_or_update ropemode http://bitbucket.org/agr/ropemode
-
-    cd ../pylibs
-    ln -f -s ../src/rope/rope
-    ln -f -s ../src/ropemode/ropemode
-    ln -f -s ../src/ropevim/ropevim.py
-    cd ..
-}
-
-function gen_vim_config
-{
-    echo "let \$PYTHONPATH .= \":`pwd`/pylibs\"" > rope.vim
-    echo "source `pwd`/src/ropevim/ropevim.vim" >> rope.vim
-    echo "Now, just add \"source `pwd`/rope.vim\" to your .vimrc"
-}
-
-check_vim
-create_dirs
-pull_sources
-gen_vim_config
--- a/vim/sadness/ropevim/pylibs/rope	Thu Nov 10 10:33:30 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-../src/rope/rope
\ No newline at end of file
--- a/vim/sadness/ropevim/pylibs/ropemode	Thu Nov 10 10:33:30 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-../src/ropemode/ropemode
\ No newline at end of file
--- a/vim/sadness/ropevim/pylibs/ropevim.py	Thu Nov 10 10:33:30 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-../src/ropevim/ropevim.py
\ No newline at end of file
--- a/vim/sadness/sadness.vim	Thu Nov 10 10:33:30 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-let $rope_pypath = $HOME."/.vim/sadness/ropevim/pylibs"
-
-let $PYTHONPATH = $rope_pypath.":".$PYTHONPATH
-source $HOME/.vim/sadness/ropevim/src/ropevim/ropevim.vim