• R/O
  • HTTP
  • SSH
  • HTTPS

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

File Info

Rev. 47c92fa04bdfe749611ef22e077bc691c162a827
大小 1,195 字节
时间 2023-05-09 15:34:22
作者 Markus Prepens
Log Message

latest files from Mercurial

Content

" Configure nvim-qt

augroup ginit
  autocmd!
  autocmd VimResized * redraw | wincmd =
augroup END

GuiTabline 0
GuiPopupmenu 0
GuiScrollBar 0

function GetFontInfo(...)
    let font_dict = {}
    let font_dict.family = escape(split(&gfn, ":")[0], ' ')
    try
        let font_height_str = split(&gfn, ":h")[1]
        if a:0 == 1 && a:1 == "+"
            let height = min([20, str2nr(font_height_str) + 1])
        elseif a:0 == 1 && a:1 == "-"
            let height = max([6, str2nr(font_height_str) - 1])
        else
            let height = str2nr(font_height_str)
        endif
        let font_dict.height = string(height)
    catch /.*/
        " height info not part of &gfn: use default
        let font_dict.height = "11"
    endtry
    return font_dict
endfunction

nnoremap <f10> <cmd>GuiTreeviewToggle<CR>
nnoremap <f11> <cmd>ToggleFullScreen<CR>
command! -nargs=0 ToggleFullScreen call GuiWindowFullScreen(g:GuiWindowFullScreen?0:1)

nnoremap <expr> <C-ScrollWheelUp> "<cmd>GuiFont! " .. GetFontInfo().family .. ":h" .. GetFontInfo("+").height .. "<CR>"
nnoremap <expr> <C-ScrollWheelDown> "<cmd>GuiFont! " .. GetFontInfo().family .. ":h" .. GetFontInfo("-").height .. "<CR>"