Leave a blank line between function declarations, and use the curly braces { and } to "jump paragraph"
There's more tips here: http://vim.wikia.com/wiki/Moving_around
How to setup VIM
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- yetneverdone
- Party member
- Posts: 448
- Joined: Sat Sep 24, 2016 11:20 am
- Contact:
Re: How to setup VIM
Did you mean like this form?Inny wrote: ↑Wed Apr 19, 2017 11:59 pm Leave a blank line between function declarations, and use the curly braces { and } to "jump paragraph"
There's more tips here: http://vim.wikia.com/wiki/Moving_around
function etc etc
--line
function etc etc etc
--line
My GameDev Website
Going Home:A Pixelated Horror Game
My Repositories!
Follow me lovingly!
Nga pala, pinoy ako.
Going Home:A Pixelated Horror Game
My Repositories!
Follow me lovingly!
Nga pala, pinoy ako.
Re: How to setup VIM
No, like this:
Code: Select all
function name(args)
-- body
end
local function other_name(args)
-- body
end
this_is_okay_too = function(args)
-- body
end
- yetneverdone
- Party member
- Posts: 448
- Joined: Sat Sep 24, 2016 11:20 am
- Contact:
Re: How to setup VIM
That was what i meant haha just got lazy typing in mobile. Well that works but not in all case jumps around functions since if there is also an empty line in between function and end,it will jump to that.Inny wrote: ↑Thu Apr 20, 2017 7:43 pmNo, like this:The key is there is an empty line between declarations, so vim knows where to jump to.Code: Select all
function name(args) -- body end local function other_name(args) -- body end this_is_okay_too = function(args) -- body end
My GameDev Website
Going Home:A Pixelated Horror Game
My Repositories!
Follow me lovingly!
Nga pala, pinoy ako.
Going Home:A Pixelated Horror Game
My Repositories!
Follow me lovingly!
Nga pala, pinoy ako.
Re: How to setup VIM
Btw I figured out a better way to do this. With the old method, the console automatically quits on errors, which makes it hard to debug... So here's the improved version:davisdude wrote: ↑Wed Mar 29, 2017 8:18 pmYeah, it took me a while to figure out something that really worked for my needs. For running single files, I actually use "!start cmd /c python % && pause" that way I can see the output of the console before it closes. I'm not completely sure if it works on Linux or not, though. I definitely second this, as well as the "Don't just blindly use them unless you understand them" bit.
Code: Select all
<leader>r :silent !start cmd /c "lua % & pause"<CR>
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
- yetneverdone
- Party member
- Posts: 448
- Joined: Sat Sep 24, 2016 11:20 am
- Contact:
Re: How to setup VIM
You can use vim-dispatch to do that, and also to edit the code while the game is running (good for hot reloading)
My GameDev Website
Going Home:A Pixelated Horror Game
My Repositories!
Follow me lovingly!
Nga pala, pinoy ako.
Going Home:A Pixelated Horror Game
My Repositories!
Follow me lovingly!
Nga pala, pinoy ako.
Who is online
Users browsing this forum: Bing [Bot] and 2 guests