Loading ...
Sorry, an error occurred while loading the content.

RES: expanding tabs while using splits

Expand Messages
  • Damian Rodriguez Sanchez
    De: vim_use@googlegroups.com [mailto:vim_use@googlegroups.com] Em nome de Marc Jessome Enviada em: sexta-feira, 23 de novembro de 2012 13:39 Para:
    Message 1 of 4 , Nov 23, 2012
    • 0 Attachment
      De: vim_use@... [mailto:vim_use@...] Em nome de
      Marc Jessome
      Enviada em: sexta-feira, 23 de novembro de 2012 13:39
      Para: vim_use@...
      Assunto: Re: expanding tabs while using splits

      I believe that if you do
      au FileType make setlocal noexpandtab
      it will do what you want.




      Perfect!

      Thanks,

      Damian.




      ------------------------------------------------------------------------
      Empresas de Telecom, precisando é só ligar.

      A Itautec tem serviçoes sob medida para vocês.

      Saiba mais: www.itautec.com.br/fazendoconexoes

      COMPUTAÇÃO CORPORATIVA E PESSOAL - AUTOMAÇÃO COMERCIAL
      AUTOMAÇÃO BANCÁRIA - SERVIÇOS TECNOLÓGICOS

      Assistência técnica em 3.700 cidades.

      -----------------------------------------------------------------------



      0

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Marc Jessome
      I believe that if you do au FileType make setlocal noexpandtab it will do what you want. -- You received this message from the vim_use maillist. Do not
      Message 2 of 4 , Nov 23, 2012
      • 0 Attachment
        I believe that if you do
        au FileType make setlocal noexpandtab
        it will do what you want.

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Marcin Szamotulski
        ... Hi Damian, First of all there are good reasons no to change the tabstop from the default 8. Setting shiftwidth to 3 should be enough. For the problem
        Message 3 of 4 , Nov 23, 2012
        • 0 Attachment
          On 11:45 Fri 23 Nov , Damian Rodriguez Sanchez wrote:
          > Hello list,
          >
          > I have always used the following lines in my .vimrc:
          >
          > :set tabstop=3
          > :set softtabstop=3
          > :set shiftwidth=3
          > :set expandtab
          >
          > au FileType make set noexpandtab
          >
          > so that tabs are replaced by 3 spaces, except for makefiles.
          >
          > Things work fine most of the time, but if I open files of
          > different types in different splits, things will stop going as
          > expected after I open the first makefile. Files opened after
          > the first makefile will also be treated as makefiles (tabs
          > will be inserted) even if they are, say, C source files.
          >
          > Is there anything I can do so that vim continues
          > to expand tabs within one same terminal window (using several
          > splits) after it opens a makefile?
          >
          >
          > Thank you,
          >
          > Damian.

          Hi Damian,

          First of all there are good reasons no to change the 'tabstop' from the
          default 8. Setting 'shiftwidth' to 3 should be enough. For the problem
          with 'expandtab' you can either add:

          au FileType make set expandtab

          to you vimrc file or add

          set expandtab

          to ~/.vim/after/ftplugin/make.vim file (:help after-directory).

          Best,
          Marcin

          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        Your message has been successfully submitted and would be delivered to recipients shortly.