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 Prochaine révision Les deux révisions suivantes | ||
utilisateurs:hypathie:tutos:vim-ide-python [09/01/2016 09:27] Hypathie [Installer VIM IDE pour python] |
utilisateurs:hypathie:tutos:vim-ide-python [12/01/2016 10:11] Hypathie [Installer VIM IDE pour python] |
||
---|---|---|---|
Ligne 11: | Ligne 11: | ||
===== Installer VIM IDE pour python ===== | ===== Installer VIM IDE pour python ===== | ||
- | === Prérequis=== | ||
- | * Pour utiliser vim avec python3 | + | ===Introduction === |
- | + | ||
- | <code root>apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \ | + | |
- | libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \ | + | |
- | libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \ | + | |
- | ruby-dev mercurial</code> | + | |
- | + | ||
- | + | ||
- | ===On supprime les versions vim existantes sur le système== | + | |
- | + | ||
- | * En effet, | + | |
+ | * 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 | ||
Ligne 50: | Ligne 40: | ||
+comments +langmap +printer +visual | +comments +langmap +printer +visual | ||
+conceal +libcall +profile +visualextra | +conceal +libcall +profile +visualextra | ||
- | +cryptv +linebreak +python +viminfo | + | +cryptv +linebreak -python +viminfo |
+cscope +lispindent -python3 +vreplace | +cscope +lispindent -python3 +vreplace | ||
</code> | </code> | ||
- | => ''+python -python3'' :-/ | + | => ''-python -python3'' :-/ |
- | <code root>apt-get remove vim vim-runtime gvim vim-tiny vim-common vim-gui-common</code> | + | * Si l'on veut repartir à neuf : |
- | ===On récupère vim à la source et on le compile avec l'option python3=== | + | <code root>dpkg --status vim</code> |
+ | <code retour> | ||
+ | Package: vim | ||
+ | Status: install ok installed | ||
+ | Priority: optional | ||
+ | Section: editors | ||
+ | Installed-Size: 2233 | ||
+ | Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> | ||
+ | Architecture: amd64 | ||
+ | Version: 2:7.4.488-7 | ||
+ | Provides: editor | ||
+ | Depends: vim-common (= 2:7.4.488-7), vim-runtime (= 2:7.4.488-7), libacl1 (>= 2.2.51-8), libc6 (>= 2.15), libgpm2 (>= 1.20.4), libselinux1 (>= 1.32), libtinfo5 | ||
+ | Suggests: ctags, vim-doc, vim-scripts | ||
+ | Description: Vi IMproved - enhanced vi editor | ||
+ | Vim is an almost compatible version of the UNIX editor Vi. | ||
+ | <...> | ||
+ | </code> | ||
- | <code root>cd ~</code> | + | On supprime la version installée et ses dépendances |
- | <code root>hg clone https://code.google.com/p/vim/</code> | + | |
- | <code root>cd vim</code> | + | |
- | <code root>./configure --with-features=huge \ | + | |
- | --enable-multibyte \ | + | |
- | --enable-rubyinterp \ | + | |
- | --enable-python3interp vi_cv_path_python3=/usr/bin/python3.4 \ | + | |
- | --with-python-config-dir=/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu \ | + | |
- | --enable-perlinterp \ | + | |
- | --enable-luainterp \ | + | |
- | --enable-gui=gtk2 --enable-cscope --prefix=/usr</code> | + | |
- | <code root>make VIMRUNTIMEDIR=/usr/share/vim/vim74</code> | + | |
- | <code root>apt-get install checkinstall</code> | + | |
- | <code root>checkinstall</code> | + | |
- | <code retour>********************************************************************** | + | <code root>apt-get remove vim vim-common vim-runtime libacl1 libc6 libselinux1 libtinfo5</code> |
- | Done. The new package has been installed and saved to | ||
- | /root/vim/vim_20151209-1_amd64.deb | + | * Sur un système Jessie tout neuf la commande : ''apt-get install vim'' |
+ | |||
+ | installera les paquets ''vim-doc'' et ''vim-scripts''. Il est suggéré d'installer aussi ''vim-common'' et ''vim-runtime''... | ||
+ | |||
+ | Allons-y : | ||
+ | |||
+ | <code root>apt-get install vim vim-common vim-runtime</code> | ||
+ | |||
+ | |||
+ | |||
+ | === Reconfiguration de vim === | ||
+ | |||
+ | Pour utiliser vim avec python3 : | ||
+ | |||
+ | * on installe pour ce qui concerne python 3 : | ||
+ | |||
+ | <code root>apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \ | ||
+ | libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \ | ||
+ | libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \ | ||
+ | ruby-dev mercurial</code> | ||
+ | |||
+ | * Pour ce concerne la configuration de vim : | ||
+ | |||
+ | <code root>apt-get install devscripts</code> | ||
- | You can remove it from your system anytime using: | ||
- | dpkg -r vim | ||
- | **********************************************************************</code> | ||
- | <note> | ||
- | **Et maintenant ''vim --version'' retourne ''-python +python3 ''** 8-) | ||
- | </note> | ||
- | ===On fait de vim son éditeur par défaut=== | + | ===Pour faire de vim son éditeur par défaut=== |
<code root>update-alternatives --install /usr/bin/editor editor /usr/bin/vim 1</code> | <code root>update-alternatives --install /usr/bin/editor editor /usr/bin/vim 1</code> | ||
Ligne 98: | Ligne 107: | ||
<code root>update-alternatives --set vi /usr/bin/vim</code> | <code root>update-alternatives --set vi /usr/bin/vim</code> | ||
- | ===Configurer vim=== | + | ===vim IDE pour python 3=== |
* On installe git | * On installe git |