1 Star 0 Fork 0

duanwujie/vim-python-ide

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

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>
Copyright (c) 2015, ETS Labs All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of "VIMRC" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

暂无描述 展开 收起
README
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/duanwujie88/vim-python-ide.git
git@gitee.com:duanwujie88/vim-python-ide.git
duanwujie88
vim-python-ide
vim-python-ide
master

搜索帮助