Arduino improvements
Spacing
This commit is contained in:
parent
feaa7b7ca0
commit
5d3264a3ce
17
init.vim
17
init.vim
@ -319,7 +319,7 @@ tnoremap <Esc> <C-\><C-n>
|
|||||||
\ 'active': {
|
\ 'active': {
|
||||||
\ 'left': [
|
\ 'left': [
|
||||||
\ [ 'mode', 'paste' ],
|
\ [ 'mode', 'paste' ],
|
||||||
\ [ 'gitbranch', 'readonly', 'filename', 'modified', 'lastmodified' ],
|
\ [ 'gitbranch', 'arduino_board', 'arduino_programmer', 'arduino_serial_baud', 'arduino_port', 'readonly', 'filename', 'modified', 'lastmodified' ],
|
||||||
\ ],
|
\ ],
|
||||||
\ },
|
\ },
|
||||||
\ 'component': {
|
\ 'component': {
|
||||||
@ -327,12 +327,18 @@ tnoremap <Esc> <C-\><C-n>
|
|||||||
\ 'readonly': '%{ &readonly ? "" : "" }',
|
\ 'readonly': '%{ &readonly ? "" : "" }',
|
||||||
\ 'gitbranch': '%{ exists("*FugitiveHead") && FugitiveHead()!="" ? "".FugitiveHead() : "" }',
|
\ 'gitbranch': '%{ exists("*FugitiveHead") && FugitiveHead()!="" ? "".FugitiveHead() : "" }',
|
||||||
\ 'lastmodified': '%{ (localtime()-getftime(expand("%:p")) < 60) ? "".localtime()-getftime(expand("%:p")) : "" }',
|
\ 'lastmodified': '%{ (localtime()-getftime(expand("%:p")) < 60) ? "".localtime()-getftime(expand("%:p")) : "" }',
|
||||||
|
\ 'arduino_board': '%{ &filetype=="arduino" ? "Board: " . ( !empty(g:arduino_board) ? g:arduino_board : "not set" ) : "" }',
|
||||||
|
\ 'arduino_serial_baud': '%{ &filetype=="arduino" ? "Serial baud: " . ( !empty(g:arduino_serial_baud) ? g:arduino_serial_baud : "not set") : "" }',
|
||||||
|
\ 'arduino_port': '%{ &filetype=="arduino" ? "Port: " . ( !empty(arduino#GetPort()) ? arduino#GetPort() : "not set" ) : "" }',
|
||||||
\ },
|
\ },
|
||||||
\ 'component_visible_condition': {
|
\ 'component_visible_condition': {
|
||||||
\ 'readonly': '(&filetype!="help" && &readonly)',
|
\ 'readonly': '(&filetype!="help" && &readonly)',
|
||||||
\ 'modified': '(&filetype!="help" && (&modified||!&modifiable))',
|
\ 'modified': '(&filetype!="help" && (&modified||!&modifiable))',
|
||||||
\ 'gitbranch': '(exists("*FugitiveHead") && FugitiveHead()!="")',
|
\ 'gitbranch': '(exists("*FugitiveHead") && FugitiveHead()!="")',
|
||||||
\ 'lastmodified': '((localtime()-getftime(expand("%:p"))) < 60)',
|
\ 'lastmodified': '((localtime()-getftime(expand("%:p"))) < 60)',
|
||||||
|
\ 'arduino_board': '(&filetype=="arduino")',
|
||||||
|
\ 'arduino_serial_baud': '(&filetype=="arduino")',
|
||||||
|
\ 'arduino_port': '(&filetype=="arduino")',
|
||||||
\ },
|
\ },
|
||||||
\ 'separator': {
|
\ 'separator': {
|
||||||
\ 'left': '',
|
\ 'left': '',
|
||||||
@ -820,6 +826,7 @@ augroup CustomCommentDefinitions
|
|||||||
autocmd FileType c setlocal commentstring=\/\/\ %s
|
autocmd FileType c setlocal commentstring=\/\/\ %s
|
||||||
autocmd FileType cpp setlocal commentstring=\/\/\ %s
|
autocmd FileType cpp setlocal commentstring=\/\/\ %s
|
||||||
autocmd FileType cuda setlocal commentstring=\/\/\ %s
|
autocmd FileType cuda setlocal commentstring=\/\/\ %s
|
||||||
|
autocmd FileType arduino setlocal commentstring=\/\/\ %s
|
||||||
autocmd FileType openscad setlocal commentstring=\/\/\ %s
|
autocmd FileType openscad setlocal commentstring=\/\/\ %s
|
||||||
autocmd FileType nix setlocal commentstring=#\ %s
|
autocmd FileType nix setlocal commentstring=#\ %s
|
||||||
autocmd FileType dot setlocal commentstring=\/\/\ %s
|
autocmd FileType dot setlocal commentstring=\/\/\ %s
|
||||||
@ -1146,6 +1153,8 @@ nnoremap <Space> :nohl<CR>
|
|||||||
autocmd FileType * let b:swap_completefunc = ''
|
autocmd FileType * let b:swap_completefunc = ''
|
||||||
autocmd FileType tex :SwapList font_sizes tiny scriptsize footnotesize small normalsize large Large LARGE huge Huge
|
autocmd FileType tex :SwapList font_sizes tiny scriptsize footnotesize small normalsize large Large LARGE huge Huge
|
||||||
autocmd FileType tex :SwapList sectioning part chapter section subsection subsubsection paragraph subparagraph
|
autocmd FileType tex :SwapList sectioning part chapter section subsection subsubsection paragraph subparagraph
|
||||||
|
autocmd FileType arduino :SwapList HIGHLOW HIGH LOW
|
||||||
|
autocmd FileType arduino :SwapList pinMode OUTPUT INPUT INPUT_PULLUP
|
||||||
autocmd BufEnter * let g:default_swap_list = [
|
autocmd BufEnter * let g:default_swap_list = [
|
||||||
\ {'name':'yes/no', 'options': ['yes','no']},
|
\ {'name':'yes/no', 'options': ['yes','no']},
|
||||||
\ {'name':'Yes/No', 'options': ['Yes','No']},
|
\ {'name':'Yes/No', 'options': ['Yes','No']},
|
||||||
@ -1263,6 +1272,12 @@ if executable("rg")
|
|||||||
set grepformat=%f:%l:%c:%m
|
set grepformat=%f:%l:%c:%m
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" vim-arduino {{{
|
||||||
|
let g:arduino_serial_cmd = 'picocom {port} -b {baud} -q'
|
||||||
|
let g:arduino_cli_args = '' " default: '-v'
|
||||||
|
let g:arduino_auto_baud = 1
|
||||||
|
" }}}
|
||||||
|
|
||||||
if $USER =~ "^jry$" && $HOSTNAME =~ "gnu"
|
if $USER =~ "^jry$" && $HOSTNAME =~ "gnu"
|
||||||
" Setup Perl language server
|
" Setup Perl language server
|
||||||
" See https://github.com/neovim/nvim-lspconfig
|
" See https://github.com/neovim/nvim-lspconfig
|
||||||
|
Loading…
Reference in New Issue
Block a user