Code Monkey home page Code Monkey logo

vim-python-ide's Introduction

Imgur

screenshot

Table of contents

Getting Started

A script shell will get a copy of the vimrc up and running on your local machine for testing purposes. The script will install the vimrc and compile the YouCompleteMe plugin:

Bash

sh -c "$(curl -fsSL https://raw.githubusercontent.com/jarolrod/vim-python-ide/master/setup.sh)"

Fish

curl -fsSL https://raw.githubusercontent.com/jarolrod/vim-python-ide/master/setup.sh | sh       

YouCompleteMe

YouCompleteMe must be compiled for it to work. The install script handles the compiling, but if something goes wrong then do the following:

  1. Make sure the following is included in your vimrc where all the vundle plugins are placed:
Plugin 'Valloric/YouCompleteMe'

MacOS

  1. Assuming you already have MacVim installed, install Cmake through brew
brew install cmake
  1. Navigate to YouCompleteMe bundle folder and run the compile script
cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer
  1. Reference the YouCompleteMe README.md for any other configuration

Linux

Make sure you have Cmake and Python 3 Headers, they can be downloaded through your distributions package manager. Then run:

cd ~/.vim/bundle/YouCompleteMe
python3 ./install.py --clang-completer

DevIcons (Optional)

This plugin is used to show file icons in NerdTree and requires additional steps to install:

  • Must install a patched font that contains required glyphs:
    • Arch Linux
    • Everyone Else
    • Set vim encoding to UTF-8
      set encoding=utf8
      
    • Set vim font to NerdFont
      set guifont=<FONT_NAME> <FONT_SIZE>
      
    • Add glyphs to Airline
      let g:airline_powerline_fonts = 1
      
  • If you dont want this feature simply remove this plugin from your vimrc and execute :PluginUpdate in vim, for proper removal delete the devicons plugin folder

Alternatively:

  • Cherry pick the parts you like from my vimrc and add it to yours

Plugins

Code and Project Navigation

Snippets

Extra

Key-Bindings

Python

let g:pymode_run_bind='<F5>'
imap <F5> <Esc>:w<CR>:!clear;python %<CR>

Switching Between Buffers

nmap <F9> :bprev<CR>
nmap <F10> :bnext<CR>

Toggle Relative Numbering

nnoremap <F4> :set relativenumber!<CR>

Comfortable Motion Scrolling

let g:comfortable_motion_scroll_down_key = "j"
let g:comfortable_motion_scroll_up_key = "k"  
nnoremap <silent> <C-d> :call comfortable_motion#flick(g:comfortable_motion_imp    ulse_multiplier * winheight(0) * 2)<CR>
nnoremap <silent> <C-u> :call comfortable_motion#flick(g:comfortable_motion_imp    ulse_multiplier * winheight(0) * -2)<CR>
nnoremap <silent> <C-f> :call comfortable_motion#flick(g:comfortable_motion_imp    ulse_multiplier * winheight(0) * 4)<CR>
nnoremap <silent> <C-b> :call comfortable_motion#flick(g:comfortable_motion_imp    ulse_multiplier * winheight(0) * -4)<CR>

NerdTree Toggle

  • NerdTree wil automatically open when vim is launched in terminal without a file
nmap " :NERDTreeToggle<CR>

Disable Arrow Keys

no <down> <Nop>
no <left> <Nop>
no <right> <Nop>
no <up> <Nop>

ino <down> <Nop>
ino <left> <Nop>
ino <right> <Nop>
ino <up> <Nop>
                                                                               
vno <down> <Nop>
vno <left> <Nop>
vno <right> <Nop>
vno <up> <Nop>

vim-python-ide's People

Contributors

boonya avatar c0rdis avatar jarolrod avatar paldepind avatar rmk135 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-python-ide's Issues

Python.vim?

Is this .vimrc available also as python.vim? I'd wish to keep my vim clean for normal use.

[deoplete] deoplete requires vim-hug-neovim-rpc plugin in Vim.

Hello I have tons of error after installing this vimrc

pythonist@Linuxoid:~$ vim
Error detected while processing /home/pythonist/.vim/vimrc:
line  393:
E319: Sorry, the command is not available in this version: python3 << EOF
line  394:
E492: Not an editor command: import vim
line  395:
E492: Not an editor command: import git
line  396:
E492: Not an editor command: def is_git_repo():
line  397:
E488: Trailing characters: ^Itry:
line  398:
E492: Not an editor command: ^I^I_ = git.Repo('.', search_parent_directories=True).git_dir
line  399:
E133: :return not inside a function
line  400:
E492: Not an editor command: ^Iexcept:
line  401:
E133: :return not inside a function
line  402:
E682: Invalid search pattern or delimiter
line  403:
E492: Not an editor command: EOF

and it appears with error
[deoplete] deoplete requires vim-hug-neovim-rpc plugin in Vim.
and it looks ugly (not like on the picture)
screenshot from 2019-01-07 22-55-13

my vim version is

pythonist@Linuxoid:~$ vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jan  7 2019 21:56:22)
Included patches: 1-700
Compiled by pythonist@Linuxoid
Huge version without GUI.  Features included (+) or not (-):
+acl               +extra_search      +mouse_netterm     +tag_old_static
+arabic            +farsi             +mouse_sgr         -tag_any_white
+autocmd           +file_in_path      -mouse_sysmouse    -tcl
+autochdir         +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +textprop
+byte_offset       -hangul_input      +num64             +timers
+channel           +iconv             +packages          +title
+cindent           +insert_expand     +path_extra        -toolbar
-clientserver      +job               -perl              +user_commands
-clipboard         +jumplist          +persistent_undo   +vartabs
+cmdline_compl     +keymap            +postscript        +vertsplit
+cmdline_hist      +lambda            +printer           +virtualedit
+cmdline_info      +langmap           +profile           +visual
+comments          +libcall           -python            +visualextra
+conceal           +linebreak         -python3           +viminfo
+cryptv            +lispindent        +quickfix          +vreplace
+cscope            +listcmds          +reltime           +wildignore
+cursorbind        +localmap          +rightleft         +wildmenu
+cursorshape       -lua               -ruby              +windows
+dialog_con        +menu              +scrollbind        +writebackup
+diff              +mksession         +signs             -X11
+digraphs          +modify_fname      +smartindent       -xfontset
-dnd               +mouse             +startuptime       -xim
-ebcdic            -mouseshape        +statusline        -xpm
+emacs_tags        +mouse_dec         -sun_workshop      -xsmp
+eval              -mouse_gpm         +syntax            -xterm_clipboard
+ex_extra          -mouse_jsbterm     +tag_binary        -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -fno-strength-reduce -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -ldl           

I use Ubuntu 18.10
What should I do to avoid these errors ? Thank you

vimrc error

第  109 行: E518: 未知的选项: pyxversion=0

Error at start after installation (second start)

I i get the following error:

"test2.py" 41L, 6379C
Fehler beim Ausführen von "function pymode#init":
Zeile    2:
E121: Undefinierte Variable: import
Zeile    3:
E121: Undefinierte Variable: sys
Zeile    4:
E121: Undefinierte Variable: sys
Fehler beim Ausführen von "/home/BODOMOS/frank/.vim/bundle/python-mode/autoload/pymode/virtualenv.vim":
Zeile    3:
E121: Undefinierte Variable: from
Fehler beim Ausführen von "function pymode#breakpoint#init":
Zeile    9:
E15: ungültiger Ausdruck: << EOF
Zeile   11:
E492: Kein Editorbefehl: from importlib.util import find_spec
Zeile   13:
E110: Fehlendes ')'
Zeile   19:
E170: Fehlendes :endfor
Tagbar: Exuberant ctags not found!
Please download Exuberant Ctags from ctags.sourceforge.net and install it in a directory in your $PATH or set g:tagbar_ctags_bin.
Fehler beim Ausführen von "function tagbar#autoopen[9]..<SNR>160_IsValidFile":
Zeile   29:
E121: Undefinierte Variable: s:known_types
E116: Ungültige Argumente für die Funktion has_key(s:known_types, a:ftype)
Betätigen Sie die EINGABETASTE oder geben Sie einen Befehl ein

E382: Cannot write, 'buftype' option is set

After installation done (with python 3.9.16 , OS : Ventura ),
I start vim , then try to :wq but it reponse like below picture :(
Screenshot 2022-12-30 at 16 23 37

I can switch to default mode by pressing ESC button either

Color scheme Base16

First, thank you for sharing your vim configuration. I have a question regarding the color schemes. I installed the base16 but when I enter vim, the colors look very different from your screenshot (and very difficult to read). When I type color scheme it shows base16-default-dark... Please, find attached the screenshot.
vim

Any idea on what could be the problem?
Thank you!

ImportError: No module named 'git' when I start Vim

On Ubuntu 16.04 running on Windows Subsystem for Linux, whenever I am running vim, it is giving the following error:

Error detected while processing /home/sagnick/.vimrc:
line  403:
Traceback (most recent call last):
  File "<string>", line 2, in <module>
ImportError: No module named 'git'
Press ENTER or type command to continue

If I press enter, it opens vim like normal. Please note that I am quite new to Vim, so I am not sure if what is appearing is normal or not. I have attached two screenshots as well.

image

image

In the second image, there seems to be a Python-related error (right at the bottom), but I have no idea how to even look at the complete error. I would really appreciate some help!

Error detected while processing VimEnter Autocommands for "*"

When I open Vim, it shows this error:

Error detected while processing VimEnter Autocommands for "*":
E492: Not an editor command: RainbowParenthesesToggle

And after

Error detected while processing VimEnter Autocommands for "*":
E492: Not an editor command:  Startify | endif

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.