View previous topic :: View next topic |
Author |
Message |
mcsky2 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Guybrush3.gif)
Joined: 25 Aug 2005 Posts: 312
|
Posted: Tue May 19, 2009 3:38 pm Post subject: [vim] probleme de tabulation |
|
|
Bonjour,
J'ai un probleme recurent avec vim sous gentoo et les tabulations.
Lorsque je copie un script à la souris qui a des tabulations simples, dans un autre fichier, ces tabulations s'incrémentent d'un a chaque ligne.
Est ce que quelqu'un sait comment désactiver ce phénomène. Je suppose que c'est dans /etc/vim/vimrc
Exemple
devient
Merci d'avance pour vos réponses |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ppg Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1482054586497e2d537d5bc.jpg)
Joined: 05 Oct 2008 Posts: 178 Location: Toulouse
|
Posted: Tue May 19, 2009 3:55 pm Post subject: |
|
|
de mémoire il faut désactiver l'auto indentation :
Ou ajouter set noai au ~/.vimrc (enfin j'utilise emacs maintenant, alors je me souviens plus bien omment on fait). |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
truc Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/128604942846f4cd99d01cb.jpg)
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Tue May 19, 2009 4:29 pm Post subject: |
|
|
juste avant de coller (et de se mettre en insert mode) tu peux faire:
puis après, tu peux revenir en normal _________________ The End of the Internet! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
GentooUser@Clubic l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/149803128341b5c95e0cc54.jpg)
Joined: 01 Nov 2004 Posts: 829
|
Posted: Wed May 20, 2009 1:04 am Post subject: |
|
|
Perso j'ai mappé ça sur la touche F12
Code: | " Passe en mode paste avec la touche <F12>
set pastetoggle=<F12>
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
truc Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/128604942846f4cd99d01cb.jpg)
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Wed May 20, 2009 5:29 am Post subject: |
|
|
Idem, (sauf que c'est la touche F10... ), le même binding est également disponible en insert mode:
Code: | nmap <silent> <F10> :set hls!<CR>
imap <silent> <F10> <c-o>:set hls!<CR> |
_________________ The End of the Internet! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|