Comments (22)
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.
I believe you're clobbering expandtab
, no?
from vim-sensible.
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.
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.
I'm guessing your vimrc is changing 'tabstop'
when it should be changing 'shiftwidth'
.
from vim-sensible.
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.
@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.
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.
So with that vimrc and sensible, when you check :verbose set expandtab?
, what is it?
from vim-sensible.
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.
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.
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.
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.
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.
I have the same problem and I checked with hex editor. It's tab.
from vim-sensible.
Report back on :verbose set tabstop? softtabstop? expandtab?
.
from vim-sensible.
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.
Try in another filetype, as that rust ftplugin looks pretty aggressive.
from vim-sensible.
.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.
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.
If you don't set 'expandtab'
, you will get the Vim default of tabs.
from vim-sensible.
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)
- set mouse=a HOT 11
- sessionoptions+=localoptions HOT 8
- Revert accidental <C-W> HOT 2
- viewoptions-=options HOT 1
- Installation instructions incorrect HOT 2
- Proposal: let g:netrw_banner = 0 HOT 2
- :set secure and :set nomodeline HOT 1
- sidescrolloff setting causes sudden row offsets in vifm plugin in Neovim on Windows HOT 1
- Scrolloff in terminal HOT 4
- Insert mode <c-w> mapping breaks abbreviations HOT 1
- "set display+=lastline" do nothing if added after "set display=truncate" HOT 1
- SSL certificate HOT 2
- `:redir` causes shell prompt to move when exiting vim HOT 2
- Terminal positions cursor in the bottom left of the screen when exiting Vim HOT 3
- Conflict with gitsessions.vim, syntax highlighting isn't restored HOT 2
- .vimrc:3: parse error near `\n' HOT 1
- Usage of :redir causes ≈10x perf regression when loading vim-sensible HOT 2
- vim-sensible causes indentation when typing "#" in YAML files? HOT 4
- New to vim - Followed instructions but nothing HOT 1
- Line 62, laststatus = 2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-sensible.