Last active
February 3, 2022 19:10
-
-
Save mlabrkic/ccc989089190b55062d7a2163dfb837c to your computer and use it in GitHub Desktop.
How to export all Neovim default settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- init.lua | |
-- How to export all Neovim default settings | |
-- :h set | |
-- :set all " Show all options. | |
-- First: Neovim, exit | |
-- --------------------------------------------------------- | |
-- 1) | |
-- Choose the Neovim CONFIG: | |
-- OS: Windows 10 | |
-- Neovim_goto_version_2.bat | |
-- / stable release or development prerelease (nightly) / | |
-- Run: Win-R, admin-prompt | |
-- ("admin-prompt.lnk", I put it in a folder in my Windows path (for example): C:\UTILS\) | |
-- Go to nvim2 (test) config: | |
-- nvbat_goto_version_2.bat 2 | |
-- --------------------------------------------------------- | |
-- 2) | |
-- Delete all files in folders: | |
-- %USERPROFILE%\AppData\Local\nvim\ | |
-- %USERPROFILE%\AppData\Local\nvim-data\ | |
-- Copy this "init.lua" to folder: | |
-- C:\Users\username\AppData\Local\nvim\ | |
-- %USERPROFILE%\AppData\Local\nvim\ | |
-- --------------------------------------------------------- | |
-- Just as info | |
-- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands | |
-- https://ss64.com/nt/ | |
-- Search (open command prompt): Win-S, cmd | |
-- CD /d %USERPROFILE% "\AppData\Local\" | |
-- cd nvim-data\site\pack\packer\start\telescope-fzf-native.nvim\ | |
-- --------------------------------------------------------- | |
-- 3) | |
-- Export all Neovim default settings (:set all) | |
-- Run Neovim | |
-- https://vim.fandom.com/wiki/Capture_ex_command_output | |
-- :redir @a | |
-- :set all | |
-- :redir END | |
-- Now, register 'a' will have the output of the "set all" ex command. | |
-- You can paste this into a Vim buffer, using "ap | |
-- --------------------------------------------------------- | |
-- 4) | |
-- I just want one column: | |
-- https://stackoverflow.com/questions/1229900/reformat-in-vim-for-a-nice-column-layout | |
-- :%s/\s\+/\r/g | |
-- :h registers | |
-- ": Contains the most recent executed command-line. | |
-- Paste last command: ":p | |
-- '<,'>s/\s\+/\r/g | |
-- --------------------------- | |
-- Select ( '<,'> ) only those rows that contain more options (rows 4 - 27). | |
-- :'<,'> | |
-- Paste command (CTRL-R, *): s/\s\+/\r/g | |
--> | |
-- :'<,'>s/\s\+/\r/g | |
-- --------------------------------------------------------- | |
-- Select ( '<,'> ) ex rows that contain more options (rows 4 - 27). | |
-- :sort | |
-- --------------------------------------------------------- | |
-- vim.cmd [[set clipboard+=unnamedplus]] -- MB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment