Giter VIP home page Giter VIP logo

Comments (22)

tpope avatar tpope commented on July 21, 2024

What is this "tabs-as-spaces" option you speak of? AFAIK the only relevant option sensible touches is 'smarttab', which should be a net positive for both camps.

from vim-sensible.

mshron avatar mshron commented on July 21, 2024

I believe you're clobbering expandtab, no?

from vim-sensible.

tpope avatar tpope commented on July 21, 2024

Absolutely not.

On Wed, Dec 18, 2013 at 4:04 PM, Max Shron [email protected] wrote:

I believe you're clobbering expandtab, no?


Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-30880576
.

from vim-sensible.

mshron avatar mshron commented on July 21, 2024

That's what I'm seeing. With vim-sensible on when I hit <tab> I get a
tabstop. If I remove vim-sensible from ~.vim/bundle (I'm using pathogen)
and hit <tab> I get four spaces. When I comment out set expandtab in my
.vimrc and hit <tab> I get a tabstop.

Apologies if I'm missing something obvious.

On Wed, Dec 18, 2013 at 4:09 PM, Tim Pope [email protected] wrote:

Absolutely not.

On Wed, Dec 18, 2013 at 4:04 PM, Max Shron [email protected]
wrote:

I believe you're clobbering expandtab, no?


Reply to this email directly or view it on GitHub<
https://github.com/tpope/vim-sensible/issues/66#issuecomment-30880576>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-30880894
.

from vim-sensible.

tpope avatar tpope commented on July 21, 2024

I'm guessing your vimrc is changing 'tabstop' when it should be changing 'shiftwidth'.

from vim-sensible.

mshron avatar mshron commented on July 21, 2024

Commenting out tabstop doesn't change the behavior.

.vimrc:

set cindent
set autoindent
set expandtab
set nocompatible
set history=1000
set shiftwidth=4
"set tabstop=4
set backspace=indent,eol,start

set mouse=a
map
map
"augroup filetypedetect
" au BufNewFile,BufRead *.pig set filetype=pig syntax=pig
" au BufNewFile,BufRead *.clj set filetype=clj syntax=clojure
"augroup END

syntax on
filetype plugin indent on

execute pathogen#infect()

au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
let g:rbpt_colorpairs = [
\ ['brown', 'RoyalBlue3'],
\ ['Darkblue', 'SeaGreen3'],
\ ['darkgray', 'DarkOrchid3'],
\ ['darkgreen', 'firebrick3'],
\ ['darkcyan', 'RoyalBlue3'],
\ ['darkred', 'SeaGreen3'],
\ ['darkmagenta', 'DarkOrchid3'],
\ ['brown', 'firebrick3'],
\ ['gray', 'RoyalBlue3'],
\ ['black', 'SeaGreen3'],
\ ['darkmagenta', 'DarkOrchid3'],
\ ['Darkblue', 'firebrick3'],
\ ['darkgreen', 'RoyalBlue3'],
\ ['darkcyan', 'SeaGreen3'],
\ ['darkred', 'DarkOrchid3'],
\ ['red', 'firebrick3'],
\ ]
let g:rbpt_max = 16
let g:rbpt_loadcmd_toggle = 0

match ErrorMsg '%>80v.+'

On Wed, Dec 18, 2013 at 4:26 PM, Tim Pope [email protected] wrote:

I'm guessing your vimrc is changing 'tabstop' when it should be changing
'shiftwidth'.


Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-30882362
.

from vim-sensible.

justinmk avatar justinmk commented on July 21, 2024

@mshron Try removing set nocompatible. It resets settings to their defaults, so it should either be at the top, or not at all. The existence of .vimrc automatically sets it, so it actually is not needed at all.

from vim-sensible.

mshron avatar mshron commented on July 21, 2024

Good point re: nocompatible, but still no luck on my end. I still see that
if I mv bundle/vim-sensible . I get tabs-as-spaces back and if I mv vim-sensible bundle it goes back to tabs-as-tabs.

On Thu, Dec 19, 2013 at 2:24 PM, justinmk [email protected] wrote:

@mshron https://github.com/mshron Try removing set nocompatible. It
resets settings to their defaults, so it should either be at the top, or
not at all. The existence of .vimrc automatically sets it, so it actually
is not needed at all.


Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-30957697
.

from vim-sensible.

tpope avatar tpope commented on July 21, 2024

So with that vimrc and sensible, when you check :verbose set expandtab?, what is it?

from vim-sensible.

mshron avatar mshron commented on July 21, 2024

expandtab
Last set from ~/.vimrc

On Thu, Dec 19, 2013 at 2:49 PM, Tim Pope [email protected] wrote:

So with that vimrc and sensible, when you check :verbose set expandtab?,
what is it?


Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-30959875
.

from vim-sensible.

tpope avatar tpope commented on July 21, 2024

I can think of only one reason that tab would insert a hard tab with 'expandtab' set, and that's if <Tab> is remapped. Check :verbose imap <Tab>.

from vim-sensible.

mshron avatar mshron commented on July 21, 2024

No mapping found.

It's fixed if I comment out set smarttab in sensible.vim, which is
sub-optimal but not really a big deal.

On Thu, Dec 19, 2013 at 3:29 PM, Tim Pope [email protected] wrote:

I can think of only one reason that tab would insert a hard tab with
'expandtab' set, and that's if is remapped. Check :verbose imap
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-30963537
.

from vim-sensible.

tpope avatar tpope commented on July 21, 2024

Oh, my guess is you're assuming it's a hard tab because it backspaces as
one chunk. It's spaces. I guarantee it.

On Thu, Dec 19, 2013 at 3:42 PM, Max Shron [email protected] wrote:

No mapping found.

It's fixed if I comment out set smarttab in sensible.vim, which is
sub-optimal but not really a big deal.

On Thu, Dec 19, 2013 at 3:29 PM, Tim Pope [email protected]
wrote:

I can think of only one reason that tab would insert a hard tab with
'expandtab' set, and that's if is remapped. Check :verbose imap
.


Reply to this email directly or view it on GitHub<
https://github.com/tpope/vim-sensible/issues/66#issuecomment-30963537>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-30964523
.

from vim-sensible.

mshron avatar mshron commented on July 21, 2024

Got it, apologies for all of the confusion! Thanks.

On Thu, Dec 19, 2013 at 3:48 PM, Tim Pope [email protected] wrote:

Oh, my guess is you're assuming it's a hard tab because it backspaces as
one chunk. It's spaces. I guarantee it.

On Thu, Dec 19, 2013 at 3:42 PM, Max Shron [email protected]
wrote:

No mapping found.

It's fixed if I comment out set smarttab in sensible.vim, which is
sub-optimal but not really a big deal.

On Thu, Dec 19, 2013 at 3:29 PM, Tim Pope [email protected]
wrote:

I can think of only one reason that tab would insert a hard tab with
'expandtab' set, and that's if is remapped. Check :verbose imap
.


Reply to this email directly or view it on GitHub<
https://github.com/tpope/vim-sensible/issues/66#issuecomment-30963537>
.


Reply to this email directly or view it on GitHub<
https://github.com/tpope/vim-sensible/issues/66#issuecomment-30964523>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-30965023
.

from vim-sensible.

decafbad avatar decafbad commented on July 21, 2024

I have the same problem and I checked with hex editor. It's tab.

from vim-sensible.

tpope avatar tpope commented on July 21, 2024

Report back on :verbose set tabstop? softtabstop? expandtab?.

from vim-sensible.

decafbad avatar decafbad commented on July 21, 2024

tabstop=4
Last set from ~/.vim/bundle/rust/ftplugin/rust.vim
softtabstop=4
Last set from ~/.vim/bundle/rust/ftplugin/rust.vim
expandtab
Last set from ~/.vim/bundle/vim-sleuth/plugin/sleuth.vim

"and my .vimrc
set background=dark
set tabstop=4
set shiftwidth=4
set expandtab
execute pathogen#infect()
filetype plugin indent on
let g:syntastic_python_checkers = ['pyflakes']
set laststatus=2

It's the latest Vim RPM came with Centos 7

from vim-sensible.

tpope avatar tpope commented on July 21, 2024

Try in another filetype, as that rust ftplugin looks pretty aggressive.

from vim-sensible.

decafbad avatar decafbad commented on July 21, 2024

.py and .txt files are ok. Looks like rust plugin is the problem. The funny thing is, rust convention dictates also four spaces. I'll report them. Thanks.

from vim-sensible.

ilium007 avatar ilium007 commented on July 21, 2024

Sorry to drag this up again but I am getting tabs instead of spaces. I am testing in a 'sh' file type (after I noticed weird tab spacing in a yaml filetype. `

I have commented out the usual settings for tabs to spaces that I would have for this in my .vimrc:

set nocompatible

filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

Bundle 'gmarik/vundle'

"my bundles
Bundle 'tpope/vim-sensible'
Bundle 'bling/vim-airline'
Bundle 'Raimondi/delimitMate'
Bundle 'hynek/vim-python-pep8-indent'

"color schemes
Bundle 'altercation/vim-colors-solarized'

"set tabstop=4       " number of visual spaces per TAB
"set softtabstop=4   " number of spaces in tab when editing
"set expandtab       " tabs are spaces

filetype on
syntax on
filetype plugin indent on

syntax enable
set background=dark
colorscheme solarized
let g:solarized_contrast = "high"

"toggle paste mode
set pastetoggle=<F2>

"no audible bell
set visualbell

When I open a new .sh file, for example and enter insert mode, I hit tab and get a TAB not 4 spaces as I would expect. It's definitely a TAB because if I move the cursor back to the left after hitting the TAB key its jumps back the TAB distance, not singularly over 4 spaces.

from vim-sensible.

tpope avatar tpope commented on July 21, 2024

If you don't set 'expandtab', you will get the Vim default of tabs.

from vim-sensible.

ilium007 avatar ilium007 commented on July 21, 2024

Ok cool - so that isn't something that is set in your vim-sensible ? Thanks for the code by the way !

from vim-sensible.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.