diff options
-rw-r--r-- | .config/nvim/init.vim | 10 | ||||
-rwxr-xr-x | .local/share/bin/= | 18 |
2 files changed, 24 insertions, 4 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 03e10a2..03150b5 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -26,6 +26,7 @@ let g:airline_powerline_fonts = 1 let g:minimap_highlight='Visual' let g:python3_host_prog='/usr/bin/python3' let g:DiffColors = 0 +let g:AutoPairsMultilineClose = 0 if exists("g:neovide") nmap <silent> <C-=> :lua vim.g.neovide_scale_factor = vim.g.neovide_scale_factor + 0.1<CR> @@ -95,7 +96,6 @@ call plug#end() " keybinds tnoremap <Esc> <C-\><C-n> - nnoremap tt :tabnew<CR> nnoremap <CR> o<Esc> nnoremap <leader>qf <Plug>(coc-fix-current) @@ -254,7 +254,7 @@ let g:vimtex_compiler_latexmk_engines = { '_': '' } " TeX quotes autocmd FileType tex let b:surround_{char2nr("q")} = "`\r'" autocmd FileType tex let b:surround_{char2nr('Q')} = "``\r''" -autocmd FileType tex let b:AutoPairs = AutoPairsDefine({'(':')', '[':']', '{':'}', "``":"''", "`":"'", '$':'$', '"':'"'}) +autocmd FileType tex let b:AutoPairs = {'(':')', '[':']', '{':'}', "``":"''", "`":"'", '$':'$', '"':'"'} " AutoPairs for plantuml autocmd FileType plantuml let b:AutoPairs = {'(':')', '[':']', '{':'}', '`':'`'} @@ -355,6 +355,12 @@ augroup devicetree_ft au BufRead,BufNewFile *.dtsi set syntax=dts augroup END +augroup BibLaTeX + " add allowed characters in biblatex labels to word delimiters + autocmd! + autocmd FileType bib setlocal iskeyword+=:,- +augroup END + " sneak let g:sneak#use_ic_scs = 0 diff --git a/.local/share/bin/= b/.local/share/bin/= index 59b9b45..dd8ba6c 100755 --- a/.local/share/bin/= +++ b/.local/share/bin/= @@ -1,2 +1,16 @@ -#!/bin/sh -python3 -c "from math import *; deg = pi / 180; print($*)" +#!/bin/python3 -- +from sys import argv as _argv + +from math import * +deg = pi / 180 + +MIN = min +MAX = max +BIT = lambda n: 1 << n +GENMASK = lambda h, l: (BIT(MAX(h, l) + 1) - 1) ^ (BIT(MIN(h, l)) - 1) + +try: + print(eval(" ".join(_argv[1:]))) +except: + exit(1) + |