The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Get The Currnet Neovim Cursor Position With Lua

TODO: Pull subtitle into page object
Code
local position = vim.fn.getcurpos()
local line = position[2]
local column = position[3]

print(line)
print(column)
Results
replace this

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Get The Currnet Neovim Cursor Position With Lua

-- code
-- lua

local position = vim.fn.getcurpos()
local line = position[2]
local column = position[3]

print(line)
print(column)

-- results/

replace this

-- /results

-- ref
-- title: Neovim Docs: getcurpos() 
-- url: https://neovim.io/doc/user/builtin.html#getcurpos()

Get the position of the cursor in Neovim


-- categories
-- Neovim 

-- metadata
-- date: 2023-10-23 18:53:19
-- id: 2xbtipil
-- site: aws
-- type: post 
-- status: published