0

Vim details:

$ vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun  5 2020 21:30:37)
macOS version

Here you can see that package v1 word in the starting of the file is not visible properly. This happens only with .go file, vimrc file as below,

syntax on

colo gruvbox

" Flash screen instead of beep sound
set visualbell

" Change how vim represents characters on the screen
set encoding=utf-8

" Set the encoding of files written
set fileencoding=utf-8

" Show tabs set 0 if donot want tabs
set showtabline=2

autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4
autocmd Filetype go setlocal tabstop=4 shiftwidth=4 softtabstop=4
" ts - show existing tab with 4 spaces width
" sw - when indenting with '>', use 4 spaces width
" sts - control <tab> and <bs> keys to match tabstop

" Control all other files
set shiftwidth=4

set undofile " Maintain undo history between sessions
set undodir=~/.vim/undodir

" Hardcore mode, disable arrow keys.
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>

filetype plugin indent on
set backspace=indent,eol,start

" go-vim plugin specific commands
" Also run `goimports` on your current file on every save
" Might be be slow on large codebases, if so, just comment it out
let g:go_fmt_command = "goimports"

" Status line types/signatures.
let g:go_auto_type_info = 1

au filetype go inoremap <buffer> . .<C-x><C-o>

" If you want to disable gofmt on save
" let g:go_fmt_autosave = 0
"

" NERDTree plugin specific commands
":nnoremap <C-g> :NERDTreeToggle<CR>
"autocmd vimenter * NERDTree
"let NERDTreeMapOpenInTab='<ENTER>'


" air-line plugin specific commands
let g:airline_powerline_fonts = 1
let g:airline_theme='angr'
let g:airline#extensions#tabline#enabled = 1

if !exists('g:airline_symbols')
    let g:airline_symbols = {}
endif

" unicode symbols
let g:airline_symbols.whitespace = 'Ξ'
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''

enter image description here

When I use visual mode on the package v1

enter image description here

Murtuza Z
  • 5,639
  • 1
  • 28
  • 52
  • With the cursor on either missing character, what do you get when you press `ga`? – romainl Apr 01 '21 at 09:46
  • I get `

    112, Hex 70, Octal 160`

    – Murtuza Z Apr 01 '21 at 09:48
  • With the cursor on the `p` or the `a`, do `:echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')`. It should give you the name of a highlight group (`goDirective`, for example) which you can then use like this: `:verbose hi goDirective` to see how it is supposed to be rendered. Can you report both findings? Also, when you enter insert mode, do you see those two characters? – romainl Apr 01 '21 at 09:54
  • ['goPackage'] & `::verbose hi goPackage goPackage xxx links to Statement Last set from ~/.vim/pack/plugins/start/vim-go/syntax/go.vim line 19` – Murtuza Z Apr 01 '21 at 10:00
  • No I can't see them in Insert mode as well but after visual mode i can see them – Murtuza Z Apr 01 '21 at 10:01
  • OK, I got the problem when I turned on either `set showtabline=2` or `let g:airline#extensions#tabline#enabled = 1` I started to see this issue, if I disbale them then I can see `package v1` word properly, @romainl Any solution for this issue? – Murtuza Z Apr 01 '21 at 10:11
  • No, but it looks like the next step for you would be airline's issue tracker. – romainl Apr 01 '21 at 10:30

0 Answers0