mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-12-28 09:13:59 +00:00
Compare commits
6 Commits
16de9cf027
...
0b13cc3ed8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b13cc3ed8 | ||
|
|
fc814a5129 | ||
|
|
63a74f8d0b | ||
|
|
9bdc47b5d3 | ||
|
|
8d76247947 | ||
|
|
7f662c07bc |
8
init.lua
8
init.lua
@ -85,11 +85,12 @@ P.S. You can delete this when you're done too. It's your config now! :)
|
|||||||
--]]
|
--]]
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
-- One last note before we leave you to play around: Lua is a real programming language.
|
-- One last note before we leave you to explore: Lua is a real programming language.
|
||||||
-- Why is that important? First of all, that you can use all the features of Lua,
|
-- Why is that important? First of all, that you can use all the features of Lua,
|
||||||
-- like variables, conditionals, loops and functions. Secondly, that you can interact with
|
-- like variables, conditionals, loops and functions. Secondly, that you can interact with
|
||||||
-- neovim in concise way. The following lines contain two examples that might give you some inspirations.
|
-- neovim in a concise way. The following lines contain two examples that might give you some inspiration.
|
||||||
-- This snippet adds a keymap to open a predefined file in a new tab:
|
-- This snippet adds a keymap to open a predefined file in a new tab:
|
||||||
|
--
|
||||||
-- local function open_notes()
|
-- local function open_notes()
|
||||||
-- vim.cmd 'tabnew'
|
-- vim.cmd 'tabnew'
|
||||||
-- vim.cmd 'tabnext'
|
-- vim.cmd 'tabnext'
|
||||||
@ -108,13 +109,16 @@ P.S. You can delete this when you're done too. It's your config now! :)
|
|||||||
-- on valid effidence that you like this feature.
|
-- on valid effidence that you like this feature.
|
||||||
--
|
--
|
||||||
-- The following snippet loads/executes some lua file when a specific file is opened:
|
-- The following snippet loads/executes some lua file when a specific file is opened:
|
||||||
|
--
|
||||||
-- if vim.fn.expand("%") == "file.txt" then
|
-- if vim.fn.expand("%") == "file.txt" then
|
||||||
-- vim.cmd("so ./additional_config.lua")
|
-- vim.cmd("so ./additional_config.lua")
|
||||||
-- end
|
-- end
|
||||||
|
--
|
||||||
-- One use-case could be a journal where the script.lua automatically moves your cursor
|
-- One use-case could be a journal where the script.lua automatically moves your cursor
|
||||||
-- to the end of file and inserts the curent date when you open it. (This suggestion is certainly not
|
-- to the end of file and inserts the curent date when you open it. (This suggestion is certainly not
|
||||||
-- the easiest example, but that it is possible at all should get your mind racing
|
-- the easiest example, but that it is possible at all should get your mind racing
|
||||||
-- with possibilities.)
|
-- with possibilities.)
|
||||||
|
--
|
||||||
-- Good luck tinkering :)
|
-- Good luck tinkering :)
|
||||||
|
|
||||||
-- Set <space> as the leader key
|
-- Set <space> as the leader key
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user