Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT →
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
utilisateurs:hypathie:tutos:vim-ide-python [12/01/2016 10:11] Hypathie [Installer VIM IDE pour python] |
utilisateurs:hypathie:tutos:vim-ide-python [29/03/2016 05:48] (Version actuelle) Hypathie [Installer VIM IDE pour python 3] |
||
---|---|---|---|
Ligne 9: | Ligne 9: | ||
- | ===== Installer VIM IDE pour python ===== | + | ===== Installer VIM IDE pour python 3===== |
- | ===Introduction === | + | ====Introduction ==== |
* Si vim est déjà installé il n'est peut être pas configuré avec un interpréteur pour python ou python 3 : | * Si vim est déjà installé il n'est peut être pas configuré avec un interpréteur pour python ou python 3 : | ||
<code user> | <code user> | ||
- | vim --version | + | vim --version | grep python |
</code> | </code> | ||
- | <code retour>VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 31 2015 23:36:07) | + | <code retour>+cryptv +linebreak -python +viminfo |
- | Rustines incluses : 1-488, 576 | + | +cscope +lispindent -python3 +vreplace</code> |
- | Modifié par pkg-vim-maintainers@lists.alioth.debian.org | + | |
- | Compilé par jamessan@debian.org | + | |
- | Énorme version avec interface graphique GTK2. | + | |
- | Fonctionnalités incluses (+) ou non (-) : | + | |
- | +acl +farsi +mouse_netterm +syntax | + | |
- | +arabic +file_in_path +mouse_sgr +tag_binary | + | |
- | +autocmd +find_in_path -mouse_sysmouse +tag_old_static | + | |
- | +balloon_eval +float +mouse_urxvt -tag_any_white | + | |
- | +browse +folding +mouse_xterm +tcl | + | |
- | ++builtin_terms -footer +multi_byte +terminfo | + | |
- | +byte_offset +fork() +multi_lang +termresponse | + | |
- | +cindent +gettext -mzscheme +textobjects | + | |
- | +clientserver -hangul_input +netbeans_intg +title | + | |
- | +clipboard +iconv +path_extra +toolbar | + | |
- | +cmdline_compl +insert_expand +perl +user_commands | + | |
- | +cmdline_hist +jumplist +persistent_undo +vertsplit | + | |
- | +cmdline_info +keymap +postscript +virtualedit | + | |
- | +comments +langmap +printer +visual | + | |
- | +conceal +libcall +profile +visualextra | + | |
- | +cryptv +linebreak -python +viminfo | + | |
- | +cscope +lispindent -python3 +vreplace | + | |
- | </code> | + | |
=> ''-python -python3'' :-/ | => ''-python -python3'' :-/ | ||
Ligne 68: | Ligne 46: | ||
On supprime la version installée et ses dépendances | On supprime la version installée et ses dépendances | ||
- | <code root>apt-get remove vim vim-common vim-runtime libacl1 libc6 libselinux1 libtinfo5</code> | + | <code root>apt-get remove vim vim-common vim-runtime</code> |
Ligne 77: | Ligne 55: | ||
Allons-y : | Allons-y : | ||
- | <code root>apt-get install vim vim-common vim-runtime</code> | + | <code root>apt-get install vim</code> |
Ligne 91: | Ligne 69: | ||
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \ | libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \ | ||
ruby-dev mercurial</code> | ruby-dev mercurial</code> | ||
- | | + | |
* Pour ce concerne la configuration de vim : | * Pour ce concerne la configuration de vim : | ||
Ligne 97: | Ligne 76: | ||
+ | * Changer les options de vim | ||
+ | On crée un répertoire où travailler : | ||
+ | <code user>mkdir temp && cd temp</code> | ||
- | ===Pour faire de vim son éditeur par défaut=== | + | On recupère les sources : |
- | <code root>update-alternatives --install /usr/bin/editor editor /usr/bin/vim 1</code> | + | <code user>apt-get source vim</code> |
- | <code root>update-alternatives --set editor /usr/bin/vim</code> | + | |
- | <code root>update-alternatives --install /usr/bin/vi vi /usr/bin/vim 1</code> | + | |
- | <code root>update-alternatives --set vi /usr/bin/vim</code> | + | |
- | ===vim IDE pour python 3=== | + | Ce qui donne : |
+ | |||
+ | <code user>ls</code> | ||
+ | |||
+ | <code retour>vim-7.4.488 vim_7.4.488-7.debian.tar.xz vim_7.4.488-7.dsc vim_7.4.488.orig.tar.gz</code> | ||
+ | |||
+ | On se déplace dans le dossier ''vim-7.4.488'' : | ||
+ | |||
+ | <code user>cd vim-7.4.488</code> | ||
+ | |||
+ | * Pour reconstruire vim | ||
+ | |||
+ | D'abord on installer toutes les dépendances nécessaires à la reconstruction du paquet : | ||
+ | |||
+ | <code root>apt-get build-dep vim</code> | ||
+ | |||
+ | Dans ce répertoire ''vim-7.4.488'' il y a le répertoire ''debian'' : | ||
+ | |||
+ | <code user>ls</code> | ||
+ | <code retour> | ||
+ | configure Filelist README_amibin.txt.info README_dos.txt README_srcdos.txt README_w32s.txt vimdir.info | ||
+ | Contents libs README_amisrc.txt README_extra.txt README_src.txt runtime Vim.info | ||
+ | Contents.info Makefile README_amisrc.txt.info README_mac.txt README.txt runtime.info vimtutor.bat | ||
+ | csdpmi4b.zip nsis README_ami.txt README_ole.txt README.txt.info src vimtutor.com | ||
+ | debian pixmaps README_ami.txt.info README_os2.txt README_unix.txt src.info Xxd.info | ||
+ | farsi README_amibin.txt README_bindos.txt README_os390.txt README_vms.txt uninstal.txt | ||
+ | </code> | ||
+ | |||
+ | Et dans ce répertoire ''debian'' il y a un fichier ''rules'' : | ||
+ | |||
+ | <code user>ls -la debian/rules</code> | ||
+ | |||
+ | <code retour>-rwxr-xr-x 1 hypathie hypathie 18825 mars 21 2015 rules</code> | ||
+ | |||
+ | Puis on édite rules pour obtenir la ligne suivante : | ||
+ | |||
+ | <code user>vim rules</code> | ||
+ | |||
+ | <code>ALLINTERPFLAGS+=--enable-python3interp --with-python3-config-dir=$(shell python3-config --configdir)</code> | ||
+ | |||
+ | On choisit son éditeur par défaut et on lui ajoute sa touche personnelle : | ||
+ | |||
+ | <code user>dch -i</code> | ||
+ | Par exemple : | ||
+ | <code> | ||
+ | vim (2:7.4.488-7.1) UNRELEASED; urgency=medium | ||
+ | * Non-maintainer upload. | ||
+ | * vim_python3 | ||
+ | </code> | ||
+ | |||
+ | On reconstruit le paquet : | ||
+ | |||
+ | <code root>debuild binary</code> | ||
+ | |||
+ | Il fait ses tests ;-) ... | ||
+ | |||
+ | Puis on on lance : | ||
+ | |||
+ | <code root>dpkg -i {vim-gtk,vim-common,vim-gui-common,vim-runtime}_*.deb</code> | ||
+ | |||
+ | <note tip> | ||
+ | Cette dernière commande se lance en étant dans le répertoire racine, où il y a les fichiers qui ont été créés par la commande ''debuild binary'' : | ||
+ | |||
+ | <code user>cd temp/ && ls</code> | ||
+ | |||
+ | <code retour>vim-7.4.488 vim-doc_7.4.488-7.1_all.deb | ||
+ | vim_7.4.488-7.1_amd64.deb vim-gnome_7.4.488-7.1_amd64.deb | ||
+ | vim_7.4.488-7.debian.tar.xz vim-gtk_7.4.488-7.1_amd64.deb | ||
+ | vim_7.4.488-7.dsc vim-gui-common_7.4.488-7.1_all.deb | ||
+ | vim_7.4.488.orig.tar.gz vim-lesstif_7.4.488-7.1_all.deb | ||
+ | vim-athena_7.4.488-7.1_amd64.deb vim-nox_7.4.488-7.1_amd64.deb | ||
+ | vim-common_7.4.488-7.1_amd64.deb vim-runtime_7.4.488-7.1_all.deb | ||
+ | vim-dbg_7.4.488-7.1_amd64.deb vim-tiny_7.4.488-7.1_amd64.deb | ||
+ | </code> | ||
+ | </note> | ||
+ | |||
+ | |||
+ | Et voilà ! | ||
+ | |||
+ | <code user>vim --version | grep python*</code> | ||
+ | <code retour>+cryptv +linebreak -python +viminfo | ||
+ | +cscope +lispindent +python3 +vreplace | ||
+ | </code> | ||
+ | |||
+ | |||
+ | ====vim IDE pour python 3==== | ||
* On installe git | * On installe git | ||
Ligne 117: | Ligne 181: | ||
#!/bin/sh | #!/bin/sh | ||
- | mkdir -p ~/.vim/autoload/ ~/.vim/bundle/ ~/.vim/colors/ ~/.vim/ftplugin/ | + | var1="~/.vim/autoload/" |
- | printf "les dossiers ~/.vim/autoload/ ~/.vim/bundle/ ~/.vim/colors/ ~/.vim/ftplugin/ ont bien été créés\n" | + | var2="~/.vim/bundle/" |
+ | var3="~/.vim/colors/" | ||
+ | var4="~/.vim/ftplugin/" | ||
+ | |||
+ | if [ -f "$var1" ] | ||
+ | then | ||
+ | echo "le fichier existe déjà !" | ||
+ | else | ||
+ | mkdir -p ~/vim/autoload/ | ||
+ | fi | ||
+ | if [ -f "$var2" ] | ||
+ | then | ||
+ | echo "le fichier existe !" | ||
+ | else | ||
+ | mkdir -p ~/.vim/bundle/ | ||
+ | if [ -f "$var3" ] | ||
+ | then | ||
+ | echo "le fichier existe !" | ||
+ | else | ||
+ | mkdir -p ~/.vim/colors/ | ||
+ | fi | ||
+ | if [ -f "$var4" ] | ||
+ | then | ||
+ | echo "le fichier existe !" | ||
+ | else | ||
+ | mkdir -p ~/.vim/ftplugin/ | ||
+ | fi | ||
ls -la ~/.vim/ | ls -la ~/.vim/ | ||
cd ~/.vim/autoload | cd ~/.vim/autoload | ||
wget https://raw.githubusercontent.com/tpope/vim-pathogen/master/autoload/pathogen.vim | wget https://raw.githubusercontent.com/tpope/vim-pathogen/master/autoload/pathogen.vim | ||
cd ~/.vim/bundle | cd ~/.vim/bundle | ||
- | git clone https://github.com/tpope/vim-sensible.git && git clone https://github.com/kien/ctrlp.vim.git && git clone https://github.com/scrooloose/nerdtree && git clone https://github.com/klen/python-mode.git && git clone https://github.com/Lokaltog/vim-powerline.git && git clone https://github.com/jistr/vim-nerdtree-tabs.git | + | git clone git clone https://github.com/scrooloose/nerdtree && git clone https://github.com/jistr/vim-nerdtree-tabs.git && git clone https://github.com/tpope/vim-sensible.git && git clone https://github.com/kien/ctrlp.vim.git && git clone https://github.com/klen/python-mode.git && git clone https://github.com/Lokaltog/vim-powerline.git && git clone https://github.com/othree/html5.vim.git && git clone https://github.com/feix760/css3complete.vim.git |
cd ~/.vim/colors | cd ~/.vim/colors | ||
wget https://raw.githubusercontent.com/thesheff17/youtube/master/vim/wombat256mod.vim | wget https://raw.githubusercontent.com/thesheff17/youtube/master/vim/wombat256mod.vim | ||
Ligne 162: | Ligne 253: | ||
</note> | </note> | ||
- | =====Utilisations===== | + | =====Configuration===== |
+ | |||
+ | Pour la gestion des téléchargements des plugins : | ||
+ | |||
+ | <code root>apt-get install git-core && apt-get install wget</code> | ||
+ | |||
+ | |||
- | ===== VIM IDE DJANGO ===== | ||