{"id":17801725,"url":"https://github.com/jfishe/vimfiles","last_synced_at":"2025-04-02T04:27:08.091Z","repository":{"id":162186009,"uuid":"87950500","full_name":"jfishe/vimfiles","owner":"jfishe","description":"Personal and work vim 8 and 9 configuration with submodules","archived":false,"fork":false,"pushed_at":"2024-10-29T17:43:27.000Z","size":572,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-29T19:00:32.543Z","etag":null,"topics":["asynchronous-lint-engine","coc","ctags","python","vim","vimrc"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfishe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-11T15:29:21.000Z","updated_at":"2024-10-29T17:43:31.000Z","dependencies_parsed_at":"2024-01-19T20:25:07.969Z","dependency_job_id":"524c0b87-fda6-400c-9eb0-e08d908e10ee","html_url":"https://github.com/jfishe/vimfiles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfishe%2Fvimfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfishe%2Fvimfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfishe%2Fvimfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfishe%2Fvimfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfishe","download_url":"https://codeload.github.com/jfishe/vimfiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246754876,"owners_count":20828425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asynchronous-lint-engine","coc","ctags","python","vim","vimrc"],"created_at":"2024-10-27T12:39:21.435Z","updated_at":"2025-04-02T04:27:08.084Z","avatar_url":"https://github.com/jfishe.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vimfiles\n\nWindows Vim configuration files based on the recommendations of\n[Ruslan Osipov], [Keep Your vimrc file clean] and [The musings of bluz71].\n\n`:help vimrc` recommends moving vimrc and gvimrc to vimfiles to make the setup\nmore portable.\n\n## Installation\n\nSeveral applications are assumed to be in the `PATH`, install [git-scm] and\nselect _User Git and optional Unix tools from the Windows Command Prompt_. See\nsteps to add a local bin directory for the other applications referenced in the\nvim configuration files.\n\n[Chocolatey] and [winget] provide package managers.\n\n```powershell\n# winget export --output=winget.json\nwinget import --import-file=winget.json\n```\n\n[Manual installation steps for older versions of WSL] provides the steps\nautomated by `wsl install`.\n\n```powershell\ndism.exe /online /enable-feature `\n  /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart\n# wsl --install -d Ubuntu --web-download\n```\n\n### SSL Error\n\n- [github: server certificate verification failed]\n  - `server certificate verification failed. CAfile: none CRLfile: none`\n  - `SSL certificate problem: unable to get local issuer certificate`\n- [How to fix ssl certificate problem unable to get local issuer certificate Git error]\n\n```bash\nopenssl s_client -showcerts -servername github.com -connect github.com:443 \\\n  \u003c/dev/null 2\u003e/dev/null |\n  sed -n -e '/BEGIN\\ CERTIFICATE/,/END\\ CERTIFICATE/ p'  \u003e github-com.pem\n# On Linux\ncat github-com.pem | sudo tee -a /etc/ssl/certs/ca-certificates.crt\n# On windows C:\\Program Files\\Git\\mingw64\\ssl\\certs\\ or some variant.\ncat github-com.pem | tee -a /mingw64/etc/ssl/certs/ca-bundle.crt\n```\n\n### Install Vim on Windows Subsystem for Linux\n\nOn Debian derivatives, like Ubuntu, the [dotfiles] repository provides an\ninstallation script for a compatible version of Vim with GTK3. It also links\n`~/.vim/` to Windows `$USERPROFILE/vimfiles/` to share configuration across\nenvironments.\n\n### Install Vim on Windows\n\n[Vim-win32-installer] includes `python3/dyn`. Download and install or use\n[Chocolatey]: `choco install vim`.\n\n- Download the selected zip file and adjust the paths as needed.\n- Not needed for recent versions of Vim 9. If needed, update the python version\n  specification in [environment.yml] to match linked version in:\n  `vim --version | grep python --color`\n\n```powershell\n$DestinationPath = Get-Item -Path \"$env:LOCALAPPDATA\\Programs\"\n$Path = Get-ChildItem -Path ~\\Downloads\\gvim_9.*_x64_signed.zip\n\nMove-Item -Path \"$DestinationPath\\Vim\\vim91\" `\n  -Destination \"$DestinationPath\\Vim\\vim91.old\" `\n  -ErrorAction SilentlyContinue\n```\n\n```powershell\nExpand-Archive -Path $Path -DestinationPath $DestinationPath\n```\n\n```powershell\n# Check vim works and remove old version.\nvim --version | grep python --color\n```\n\n```powershell\nRemove-Item -Path \"$DestinationPath\\Vim\\vim91.old\" -Recurse -Force\n```\n\nIf they don't already exist, create the batch files using the installer. They\nare needed to activate the vim-python conda environment, prior to starting Vim.\n\n```powershell\n\u0026 $(Get-Item -Path \"$DestinationPath\\Vim\\vim91\\install.exe\")\n```\n\n### `vimfiles` installation\n\nTo install in Windows under `$env:LOCALAPPDATA\\vimfiles` and symbolic link to\n`$HOME`.\n\n```powershell\ncd $env:TMP\ncurl  --output Install-Vimfiles.ps1 `\n  https://raw.githubusercontent.com/jfishe/vimfiles/master/Install-Vimfiles.ps1\n\n# To change defaults:\nGet-Help .\\Install-Vimfiles.ps1 -Full\n```\n\n```powershell\n# Clone and install submodules.\n.\\Install-Vimfiles.ps1 -Clone\n\n# Symlink vimfiles and dotfiles to $HOME.\n.\\Install-Vimfiles.ps1 -Link\n\n# Create Start-Menu shortcuts.\n.\\Install-Vimfiles.ps1 -Shortcut\n\n# Copy wsl -d Ubuntu /usr/share/dict/words to vimfiles/dictionary/words.\n# Install dictionary if needed.\n.\\Install-Vimfiles.ps1 -Dictionary\n\n# Download Moby Thesaurus from\n# https://raw.githubusercontent.com/zeke/moby/master/words.txt\n.\\Install-Vimfiles.ps1 -Thesaurus\n```\n\n- Create/update a conda environment compatible with `python3/dyn`.\n- Install [Miniforge] if needed, and create or update conda env vim-python.\n- Copy Vim batch files to `$env:LOCALAPPDATA\\Microsoft\\WindowsApps`:\n  - They are needed to activate the vim-python conda environment, prior to\n    starting Vim.\n  - If they don't already exist, create the batch files using the Vim\n    installer, usually `*\\Vim\\vim*\\install.exe`.\n- Add Windows Registry entry to run `%USERPROFILE%\\.init.cmd` when starting\n  `cmd.exe`. `.init.cmd` activates `vim-python` environment for use by Vim.\n\n```powershell\n.\\Install-Vimfiles.ps1 -Conda\n```\n\nIf you plan to share vimfiles with Windows Subsystem for Linux (WSL), ensure\ngit uses line feed for EOL. `Install-Vimfiles.ps1` automates this by setting\nthe global .gitconfig to override the system defaults.\n\n## Vimwiki\n\n### New Vimwiki Diary\n\nWhen creating a new diary (Journal) file, `VimwikiTitleJournal` creates the\ntitle heading and copies the previous diary entry from `Todo` second-level\nheading through the end of file.\n\n### VimwikiLinkHandler\n\n`VimwikiLinkHandler` opens `local:` and `file:` URLs with `wslview` or, on\nWindows, with `start!`.\n\n### Registered Wikis\n\n- Assume registered wikis, `g:vimwiki_list` are in the Windows Documents folder\n  or user home directory. You may need to link `%USERPROFILE%\\Documents` to the\n  actual location, e.g., OneDrive.\n\n  If the `%USERPROFILE%\\Documents` does not exit, either create it, or create a\n  link to the Windows Documents folder.\n\n  - To locate the Windows Documents folder in `cmd.exe`:\n\n    ```dos\n    set REG_PATH=HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\\n    set REG_PATH=%REG_PATH%User Shell Folders\n    reg query \"%REG_PATH%\" /v Personal\n    ```\n\n  - If you have administrator rights or PowerShell 7, create a symbolic link:\n\n    ```powershell\n    $Parameters = @{\n      Path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\\" +\n        \"User Shell Folders\"\n      Name = \"Personal\"\n    }\n    $Target = Get-ItemPropertyValue @Parameters\n    New-Item -ItemType SymbolicLink -Path \"$env:USERPROFILE\\Documents\" `\n      -Target \"$Target\"\n    ```\n\n  - Otherwise create a Directory Junction by replacing `\u003cTarget\u003e` with the path\n    reported by `reg query` above:\n\n    ```dos\n    cmd /c \"mklink /J %USERPROFILE%\\Documents \u003cTarget\u003e\"\n    ```\n\n## Conda\n\n[Kaa Mi]. Posted on 2024-06-19. _Using Miniforge with Conda-Forge to Avoid\nAnaconda Licensing Issues_. The [conda-forge community] maintains [Miniforge]\nthat comes configured for use with the conda-forge channel.\n\n1. Download and Install [Miniforge].\n2. Initialize Conda with `conda init`.\n3. Add Conda-Forge as the Default Channel.\n\n   ```powershell\n   # Install with Winget.\n   winget install CondaForge.Miniforge3 --exact\n\n   # Download from Github releases.\n   $Uri = 'https://github.com/conda-forge/miniforge/releases/latest/download'\n   $Exe = 'Miniforge3-Windows-x86_64.exe'\n   Invoke-WebRequest -Uri \"$Uri/$Exe\" -OutFile \"~\\Downloads\\$Exe\"\n\n   # Default configuration for Miniforge.\n   conda config --remove channels defaults\n   conda config --add channels conda-forge\n   conda config --set channel_priority strict\n   ```\n\n4. Create a New Environment. [environment.yml] lists the conda and pip packages\n   needed for the Vim configuration.\n\n   ```powershell\n   conda env create -f environment.yml\n   conda activate vim-python\n   conda config --show channels\n   ```\n\n5. Periodically update the base and vim-python environments.\n\n   ```powershell\n   conda update -n base conda\n   conda update -n vim-python --all\n   ```\n\n## Thesaurus\n\nSetup instructions are included in vimrc to install the [Moby Thesaurus List by\nGrady Ward] from Project Gutenberg. Use a browser; the site blocks scripted\ndownload.\n\n[Moby-thesaurus.org/] maintains [words.txt][Moby-thesaurus.org/].\n\n## Dictionary\n\nRefer to `:help dictionary` and download or symlink [dictionary/words]. See\nbelow for symlink instructions.\n\n`Install-Vimfiles.ps1 -Dictionary` assumes Ubuntu is the default and copies the\ndictionary since symlinks into WSL fail when the distro isn't started.\n\n## grepprg and grepformat\n\n[ripgrep] should be installed with [Chocolatey], `conda` or\n`uv tool install ripgrep`.\n\n## Gutentags \u0026 Universal ctags\n\n- [Gutentags]\n- [universal-ctags]\n\n## Conquer of Completion (CoC)\n\n[Conquer of Completion] does not depend on the python compiled with Vim. It\nsupports `node.js` modules that perform the linting functions of [ALE].\n\nThe script `after/plugin/coc.vim` installs extensions using\n`g:coc_global_extensions`. Install CoC under `opt` instead of `start` to allow\ndisabling when `node.js` is unavailable.\n\n## Asynchronous Lint Engine (ALE)\n\nThe [Asynchronous Lint Engine] supports various linting (ALELint) and\nformatting (ALEFix) tools. Many of these are `node.js` packages. See\n[jfishe/ALE_Nodejs] for a list and installation instructions. Others can be\ninstalled by `conda` or `uv pip`. See [environment.yml] for a list.\n\n## Jupyter Notebook\n\n### git configuration\n\n[nbdime] is configured by:\n\n```bash\npip install nbdime\nnbdime config-git --enable --global\n```\n\n## Windows Setup\n\n### ColorTool\n\n[ColorTool] schemes may be tested and exported to `iTerm2` format with\n[terminal.sexy].\n\n## Setup Python Project\n\n\u003c!-- TODO: \u003c07-02-25, jfishe\u003e Update for pyscaffold and uv. --\u003e\n\n```bash\ncookiecutter cookiecutter-pypackage\n```\n\nChange to the pypackage directory you created and make initial commit to source\ncontrol.\n\n```bash\ngit init\ngit add .\ngit commit -m \"Initial project scaffold\"\ngit status\n```\n\n```bash\nvirtualenv env\n# Use env/bin/activate on Linux\nenv\\Scripts\\activate\npip install -e .\n```\n\n## Git\n\n\u003c!--  TODO: \\\u003c07-02-25, jfishe\\\u003e Add git-lint.  --\u003e\n\n[ElateralLtd git commit template] provides a template and installation script\nfor standard git commit messages.\n\nThe Vim that ships with Git-bash can use the same profile as Gvim. Using WSL\nbash is the easiest method to create soft-links. Git-bash won't and recommends\nusing mklink, but mklink usually has complex ACL issues, especially in\na corporate environment. PowerShell and CMD do not recognize soft-linked\ndirectories so use `mklink /J LINK TARGET`.\n\nThe following assumes that git-bash has been configured to use `%USERPROFILE%`\nas home, which may be different than the default `%HOMEDRIVE%%HOMEPATH%`. Also,\n_Documents_ could be _My Documents_. Adjust the path for actual location of\n`vimfiles` and `vimwiki`. The vim startup script assumes that for anything,\nexcept Windows `cmd.exe`, that these files are located in `$HOME`. Soft-links\nallow pointing to the actual location.\n\n### The Case for Pull Rebase\n\n[The Case for Pull Rebase] recommends avoiding merge commits, except when\nthey're useful, such as for Pull Request merges.\n\n```bash\ngit pull --rebase # Normal to avoid merge commits.\n\n# if you're on Git 2.18 or later\ngit pull --rebase=merges\ngit config --global pull.rebase merges\n```\n\n### Git diff for Excel Files\n\nXltrail suggested [3 steps to make Spreadsheet Compare work with git diff]. The\nproposed DOS batch script does not work with Microsoft Office 2016 because\n`spreadsheetcompare` is not an installed application. Install a modified\nversion, which uses `AppVLP.exe`, as follows:\n\n```powershell\ncmd /c \"mklink $env:USERPROFILE\\bin\\xldiff.bat $env:LOCALAPPDATA\\vimfiles\\xldiff.bat\"\n```\n\n`.gitconfig` defines `[diff \"excel\"]` and `.gitattributes_global` sets\n`diff=excel` for all Excel file extensions. The batch script pauses git so that\nit does not delete any temporary files it creates. Press `\u003cEnter\u003e` in the shell\nafter exiting `spreadsheetcompare`.\n\n## KeePass2, KeeAgent and SSH\n\n[KeeAgent] (for KeePass) on Bash on Windows / WSL provides a howto. Git-bash\nonly requires `export SSH_AUTH_SOCK=~/keeagent_msys.socket` in .bash_profile,\ndepending on the KeeAgent settings in KeePass2.\n\n## Map Caps Lock to Escape, or any key to any key\n\nOn Windows install PowerToys or Uncap.\n\n### Install PowerToys\n\n- Install with [Chocolatey] or [winget].\n- Open PowerToys Settings application.\n- In Keyboard Manager, map `Caps Lock` to `Esc`.\n\n## `vimfiles` Update\n\nInstall the plugins in the Git repository.\n\n```powershell\ngit pull\ngit submodule update --init --recursive\nvim -c 'packloadall | helptags ALL | qa'\n```\n\nUpdate to the latest versions and commit the changes, if any.\n\n```powershell\ngit submodule update --init --recursive --remote\nvim -c 'packloadall | helptags ALL | qa'\ngit commit -am \"chore: update submodules\"\ngit push\n```\n\n[3 steps to make Spreadsheet Compare work with git diff]: https://www.xltrail.com/blog/git-diff-spreadsheetcompare\n[ALE]: #asynchronous-lint-engine-ale\n[Asynchronous Lint Engine]: https://github.com/dense-analysis/ale\n[Chocolatey]: https://chocolatey.org/\n[ColorTool]: https://github.com/microsoft/terminal/tree/main/src/tools/ColorTool\n[Conquer of Completion]: https://github.com/neoclide/coc.nvim\n[ElateralLtd git commit template]: https://github.com/ElateralLtd/git-commit-template\n[Gutentags]: https://github.com/ludovicchabant/vim-gutentags\n[How to fix ssl certificate problem unable to get local issuer certificate Git error]: https://komodor.com/learn/how-to-fix-ssl-certificate-problem-unable-to-get-local-issuer-certificate-git-error/\n[Kaa Mi]: https://dev.to/kaamisan/using-miniconda-with-conda-forge-to-avoid-anaconda-licensing-issues-5hkj\n[KeeAgent]: https://gist.github.com/strarsis/e533f4bca5ae158481bbe53185848d49\n[Keep Your vimrc file clean]: http://vim.wikia.com/wiki/Keep_your_vimrc_file_clean\n[Manual installation steps for older versions of WSL]: https://learn.microsoft.com/en-us/windows/wsl/install-manual\n[Miniforge]: https://docs.conda.io/projects/conda\n[Moby Thesaurus List by Grady Ward]: http://www.gutenberg.org/ebooks/3202\n[Moby-thesaurus.org/]: https://raw.githubusercontent.com/zeke/moby/master/words.txt\n[Ruslan Osipov]: http://www.rosipov.com/blog/vim-pathogen-and-git-submodules/\n[The Case for Pull Rebase]: https://megakemp.com/2019/03/20/the-case-for-pull-rebase/\n[The musings of bluz71]: https://bluz71.github.io/2017/05/15/vim-tips-tricks.html\n[Vim-win32-installer]: https://github.com/vim/vim-win32-installer/releases\n[conda-forge community]: https://conda-forge.org/\n[dictionary/words]: dictionary/words\n[dotfiles]: https://github.com/jfishe/dotfiles\n[environment.yml]: environment.yml\n[git-scm]: https://git-scm.com/\n[github: server certificate verification failed]: https://stackoverflow.com/questions/35821245/github-server-certificate-verification-failed\n[jfishe/ALE_Nodejs]: https://github.com/jfishe/ALE_Nodejs\n[nbdime]: http://nbdime.readthedocs.io/en/latest/\n[ripgrep]: https://github.com/BurntSushi/ripgrep\n[terminal.sexy]: https://terminal.sexy/\n[universal-ctags]: https://github.com/universal-ctags/ctags\n[winget]: https://learn.microsoft.com/en-us/windows/package-manager/winget/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfishe%2Fvimfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfishe%2Fvimfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfishe%2Fvimfiles/lists"}