From 8dffa8bd23606cb72831bdd22f00b41e3bce8d30 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 7 Aug 2021 02:44:57 +0800 Subject: [PATCH] chore: formatting and fix spell errors --- README.md | 4 ++-- autoload/text_obj.vim | 6 +++--- autoload/utils.vim | 4 ++-- core/autocommands.vim | 2 +- core/options.vim | 2 +- core/plugins.vim | 12 ++++++------ docs/README.md | 4 ++-- lua/config/lsp.lua | 2 +- lua/plugins.lua | 4 ++-- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 2b322b1..3eb9d73 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ # Introduction This repo hosts my Nvim configuration for all the platforms I am using (Linux, -Windows and macOS). `init.vim` is the config entrypoint for terminal Neovim, +Windows and macOS). `init.vim` is the config entry point for terminal Neovim, and `ginit.vim` is the additional config file for GUI client of Neovim (I am using [neovim-qt](https://github.com/equalsraf/neovim-qt) for now on Windows). @@ -40,7 +40,7 @@ backward compatibility is guaranteed.** + Markdown writing and syntax highlighting via [vim-markdown](https://github.com/plasticboy/vim-markdown), Markdown Previewing via [markdown-preview.nvim](https://github.com/iamcco/markdown-preview.nvim). + Command line auto-completion via [wilder.nvim](https://github.com/gelguy/wilder.nvim). -+ Annimated GUI style notifiation via [nvim-notify](https://github.com/rcarriga/nvim-notify). ++ Animated GUI style notification via [nvim-notify](https://github.com/rcarriga/nvim-notify). + Tags navigation via [vista](https://github.com/liuchengxu/vista.vim). + Source code linting via [Ale](https://github.com/dense-analysis/ale). + Code formatting via [Neoformat](https://github.com/sbdchd/neoformat). diff --git a/autoload/text_obj.vim b/autoload/text_obj.vim index 4f6a1ff..caba645 100644 --- a/autoload/text_obj.vim +++ b/autoload/text_obj.vim @@ -11,7 +11,7 @@ function! text_obj#URL() abort endif endif - " We need to find all possible URL on this line and their start, end idx. + " We need to find all possible URL on this line and their start, end index. " Then find where current cursor is, and decide if cursor is on one of the " URLs. let line_text = getline('.') @@ -54,10 +54,10 @@ function! text_obj#URL() abort endfunction function! text_obj#MdCodeBlock(type) abort - " the parameter type specify whether it is inner text objects or arround + " the parameter type specify whether it is inner text objects or around " text objects. - " Move the cursor to the end of line in case that cursor is on the openning + " Move the cursor to the end of line in case that cursor is on the opening " of a code block. Actually, there are still issues if the cursor is on the " closing of a code block. In this case, the start row of code blocks would " be wrong. Unless we can match code blocks, it not easy to fix this. diff --git a/autoload/utils.vim b/autoload/utils.vim index 8ed401e..b88e25f 100644 --- a/autoload/utils.vim +++ b/autoload/utils.vim @@ -41,7 +41,7 @@ function! utils#HasAirlinetheme(name) abort return !empty(globpath(&runtimepath, l:pat)) endfunction -" Generate random integers in the range [Low, High] in pure vimscrpt, +" Generate random integers in the range [Low, High] in pure vim script, " adapted from https://stackoverflow.com/a/12739441/6064933 function! utils#RandInt(Low, High) abort " Use lua to generate random int. It is faster. Ref: https://stackoverflow.com/a/20157671/6064933 @@ -152,7 +152,7 @@ function! utils#Inside_git_repo() abort if match(res, 'true') == -1 return v:false else - " Manually trigger a speical user autocmd InGitRepo (to use it for + " Manually trigger a specical user autocmd InGitRepo (to use it for " lazyloading of fugitive by packer.nvim). " See also https://github.com/wbthomason/packer.nvim/discussions/534. doautocmd User InGitRepo diff --git a/core/autocommands.vim b/core/autocommands.vim index 2563ce7..8e9f8f2 100644 --- a/core/autocommands.vim +++ b/core/autocommands.vim @@ -92,6 +92,6 @@ endfunction augroup git_repo_check autocmd! - autocmd VimEnter,DirChanged * call utils#Inside_git_repo() + autocmd VimEnter,DirChanged * call utils#Inside_git_repo() augroup END "} diff --git a/core/options.vim b/core/options.vim index 0150c2e..44f728f 100644 --- a/core/options.vim +++ b/core/options.vim @@ -76,7 +76,7 @@ set fileformats=unix,dos " Fileformats to use for new files set inccommand=nosplit " Show the result of substitution in real time for preview -" Ignore certain files and folders when globbing +" Ignore certain files and folders when globing set wildignore+=*.o,*.obj,*.bin,*.dll,*.exe set wildignore+=*/.git/*,*/.svn/*,*/__pycache__/*,*/build/** set wildignore+=*.jpg,*.png,*.jpeg,*.bmp,*.gif,*.tiff,*.svg,*.ico diff --git a/core/plugins.vim b/core/plugins.vim index e29fee2..23fb842 100644 --- a/core/plugins.vim +++ b/core/plugins.vim @@ -36,10 +36,10 @@ let g:UltiSnipsSnippetDirectories=['UltiSnips', 'my_snippets'] "{{ Language specific plugin """""""""""""""""""""""""" semshi settings """"""""""""""""""""""""""""""" -" Do not highlight for all occurances of variable under cursor +" Do not highlight for all occurrences of variable under cursor let g:semshi#mark_selected_nodes=0 -" Do not show error sign since linting plugin is specicialized for that +" Do not show error sign since linting plugin is specialized for that let g:semshi#error_sign=v:false """""""""""""""""""""""""" vlime settings """""""""""""""""""""""""""""""" @@ -160,7 +160,7 @@ let g:vista_stay_on_open = 0 nnoremap t :Vista!! "}} -"{{ File editting +"{{ File editing """"""""""""""""""""""""vim-auto-save settings""""""""""""""""""""""" " Enable autosave on nvim startup let g:auto_save = 1 @@ -209,7 +209,7 @@ let g:better_escape_interval = 200 let g:XkbSwitchEnabled = 1 "}} -"{{ Linting and formating +"{{ Linting and formatting """""""""""""""""""""""""""""" neoformat settings """"""""""""""""""""""" let g:neoformat_enabled_python = ['black', 'yapf'] let g:neoformat_cpp_clangformat = { @@ -306,7 +306,7 @@ nmap s omap s "}} -"{{ LaTeX editting +"{{ LaTeX editing """"""""""""""""""""""""""""vimtex settings""""""""""""""""""""""""""""" if ( g:is_win || g:is_mac ) && executable('latex') function! SetServerName() abort @@ -427,7 +427,7 @@ let g:airline#extensions#hunks#non_zero_only = 1 " Speed up airline let g:airline_highlighting_cache = 1 -" The key in the following shortcode are the layout when we use a specific +" The keys in the following shortcode are the layout when we use a specific " input method mode. On my macOS, 0 means that we are trying to input Chinese, " and 1 means we are using English mode. " See also https://github.com/vim-airline/vim-airline/blob/master/autoload/airline/extensions/xkblayout.vim#L11 diff --git a/docs/README.md b/docs/README.md index 77bdc27..acecd98 100644 --- a/docs/README.md +++ b/docs/README.md @@ -103,7 +103,7 @@ Set its PATH properly and make sure you can call `ctags` from command line. ## Ripgrep -[Ripgrep](https://github.com/BurntSushi/ripgrep), aka, `rg`, is a fast greping +[Ripgrep](https://github.com/BurntSushi/ripgrep), aka, `rg`, is a fast grepping tool available for both Linux, Windows and macOS. It is used by several searching plugins. @@ -199,7 +199,7 @@ setups. I use [packer.nvim](https://github.com/wbthomason/packer.nvim) to manage my plugins. We need to install packer.nvim on our system first. -For Windows, if curl is installed, use the following command (on Powershell): +For Windows, if curl is installed, use the following command (on PowerShell): ``` git clone --depth=1 https://github.com/wbthomason/packer.nvim "$env:LOCALAPPDATA\nvim-data\site\pack\packer\start\packer.nvim" diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua index 156566c..eae789f 100644 --- a/lua/config/lsp.lua +++ b/lua/config/lsp.lua @@ -37,7 +37,7 @@ local on_attach = function(client, bufnr) autocmd CursorHold lua require('config.lsp').show_line_diagnostics() ]] - -- Set some keybinds conditional on server capabilities + -- Set some key bindings conditional on server capabilities if client.resolved_capabilities.document_formatting then buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) end diff --git a/lua/plugins.lua b/lua/plugins.lua index 7daf987..437754e 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -82,7 +82,7 @@ require('packer').startup( -- Another grep tool (similar to Sublime Text Ctrl+Shift+F) -- use 'dyng/ctrlsf.vim' - -- A greping tool + -- A grepping tool -- use {'mhinz/vim-grepper', cmd = {'Grepper', '(GrepperOperator)'}} -- A list of colorscheme plugin you may want to try. Find what suits you. @@ -213,7 +213,7 @@ require('packer').startup( -- carefully to use its full power use 'wellle/targets.vim' - -- Plugin to manipulate characer pairs quickly + -- Plugin to manipulate character pairs quickly -- use 'tpope/vim-surround' use 'machakann/vim-sandwich'