fatih / vim-go

Go development plugin for Vim
https://www.patreon.com/bhcleek
Other
15.98k stars 1.45k forks source link

Vim jumps to end of file on save #3604

Closed roycw closed 9 months ago

roycw commented 10 months ago

New user here, here is my vim config as u can see nothing is really there. On save 'w:'

the go file cursor jumps to the end of the file. It only happen on go file with vim-go installed.....

Any idea how to fix it

Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'numToStr/Comment.nvim'
Plug 'terrortylor/nvim-comment'
Plug 'neovim/nvim-lspconfig'
Plug 'NLKNguyen/papercolor-theme'   
Plug 'kshenoy/vim-signature'
call plug#end()

set timeoutlen=100
set autowrite
set number 
set background=dark
colorscheme PaperColor

nmap <C-P> :FZF<CR>
nmap <C-S> :w<CR>
inoremap <C-S> <Esc>:w<CR>i
nmap <M-1> :so $MYVIMRC<CR>
nmap <C-x> :tabnew<CR>
nmap <C-c> :tabc<CR> 
nmap <C-a> :tabnext<CR> 
nmap <F5> :tabnew<CR>:GoRun<CR> 
nmap <F1> :e c:\Users\cubec\AppData\Local\nvim\init.vim<CR> 
inoremap <F5> <Esc>:GoRun<CR>
inoremap <F6> <Esc>:GoTest<CR>
nmap <F6> <Esc>:GoTest<CR> 

let g:go_highlight_build_constraints = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_operators = 1
let g:go_highlight_structs = 1
let g:go_highlight_types = 1
let g:go_syntastic_auto_jump = 0

lua << EOF
require('nvim_comment').setup({operator_mapping = "<M-a>"})
EOF
bhcleek commented 10 months ago

I have several questions for you:

bhcleek commented 9 months ago

closing for lack of feedback