1.四空格配置

    1. filetype plugin indent on
    2. " show existing tab with 4 spaces width
    3. set tabstop=4
    4. " when indenting with '>', use 4 spaces width
    5. set shiftwidth=4
    6. " On pressing tab, insert 4 spaces
    7. set expandtab
    8. " Set number on left
    9. set number

    2.插件位置
    /root/.config/nvim/plugged

    3.综合配置

    1. filetype plugin indent on
    2. " show existing tab with 4 spaces width
    3. set tabstop=4
    4. " when indenting with '>', use 4 spaces width
    5. set shiftwidth=4
    6. " On pressing tab, insert 4 spaces
    7. set expandtab
    8. " Set number on left
    9. set number
    10. call plug#begin()
    11. Plug 'https://github.com.cnpmjs.org/kassio/neoterm.git'
    12. call plug#end()
    13. " nnoremap <F4> <Esc>:w<CR>:Tnew<CR>:bn<CR>
    14. autocmd VimEnter * :Tnew
    15. autocmd VimEnter * :bn
    16. nnoremap <F5> <Esc>:w<CR>:T go run %<CR>:bn<CR>
    17. nnoremap <F4> <Esc>:bn<CR>

    4.一键运行

    1. autocmd FileType go nnoremap <buffer>
    2. \ <F5> :w<CR>:sp<CR>:wincmd w<CR>:resize 10<CR>:term go run %<CR>