oni icon indicating copy to clipboard operation
oni copied to clipboard

Oni renders tabs as ^I

Open Tebro opened this issue 8 years ago • 7 comments

If I hit tab myself there is no issue, but when using vim-go together with gofmt to automatically format a go file, the file is shown with ^I instead of blank space for tabs.

2018-03-15-210615_1920x1080_scrot

Tebro avatar Mar 15 '18 19:03 Tebro

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot avatar Mar 15 '18 19:03 oni-bot

Hey!

This is due to Oni's default config, and the setting of :set list in it, which renders tabs like that. We are almost at the point where the tab settings are good enough in Oni we can get rid of it, since you are definitely not the first person to hit this. (See #973)

If you add "vim.setting.list": false, in your config it will stop this happening. Or alternatively, you can disable the default Oni config, but that disables a lot more.

CrossR avatar Mar 15 '18 19:03 CrossR

Ah, thank you! That solved the issue. Oni is looking promising so far, will take it into use for evaluation into replacing my spacemacs monster ;)

Closing issue.

Tebro avatar Mar 15 '18 19:03 Tebro

@bryphe What do you think of removing the set list and set listchars from the default config?

These are happening too often.

We can make it so that the default config is less intrusive and "vim.setting.list": true, changes the config on the fly.

badosu avatar Mar 15 '18 20:03 badosu

From my understanding, we could remove

" Helpers for command mode
" %% for current buffer file name
" :: for current buffer file path
cnoremap %% <C-R>=fnameescape(expand('%'))<CR>
cnoremap :: <C-R>=fnameescape(expand('%:p:h'))<CR>/

" Make Control+nav keys functionality in insert mode
inoremap <expr> <C-a> pumvisible() ? "<Esc>A" : "<C-o>A"
inoremap <expr> <C-b> pumvisible() ? "<Esc>bi" : "<C-o>b"
inoremap <expr> <C-l> pumvisible() ? "<Esc>la" : "<C-o>a"

set list
set listchars=trail:· 

All from the core config without causing any issues.

There are a few other bits we can remove once there are options (ie the tabstop settings @bryphe has a PR for), but the stuff above I think could be removed right away with no real issues.

Possibly smartcase though that hasn't caused any issues so far, so its a little less urgent, and is mirrored by the default for Oni's QuickOpen, so makes sense.

There is also already an issue for rendering whitespace, which is what this option does, so it feels like we could remove the above bits now.

CrossR avatar Mar 15 '18 20:03 CrossR

Sure, let's get rid of those! They are vestigial from my config and shouldn't be in the core config.

I'm on-board with removing that full set called out by @CrossR

bryphe avatar Mar 15 '18 20:03 bryphe

I've cleaned up the bits I've laid out here, so this sort of issue shouldn't happen again! The finer details of reducing the scope of the init.vim can be carried on in the existing ticket.

CrossR avatar Mar 16 '18 16:03 CrossR