6:05 Wouldn't it be better to use `ctags` for that instead of a regex? From last I used it, it is *impressively* easy to add custom language support and makes it easier to add integrations with other tools and gives at least _some_ semantic understanding. (Like distinguishing different types of variables etc) Also it makes searching cross-project easier. (I think it should also be possible to re-index your project on inotify events ...) Edit: Apparently there is a vim-plugin that updates the `ctag` index incrementally on-save!
@@doomer_haskell It is one of the tools of old from a time where things like LSP didn't exist. It is very useful for areas where LSPs still don't really exist today!
Thanks ctags is definitely amazing project (I use it rust because lsp is so freaking slow) but the thing I am doing here is not regex based it's just a native vim search by the (a word under cursor) + : and if nothing found just fallbacks to the first occurrence in the file which works incredibly well in any language because you usually define something with a type separated by column (e.g. struct fields, arguments, variables with type and so on)
@@neogoose_btw Yeah maybe I expressed badly what I mean. What I mean is that you could look at man ctags-optlib to define your own ctag language parser for assembly, so that you can do goto-definition, references etc via ctag. (Though there might already be a asm ctag parser that does what you want)
@@neogoose_btw Okay, maybe I expressed it badly. What I mean is that ctags lets you define your own languages (see man ctags-optlib) with which you could then add the name being defined + : as pattern and then use that for goto-definition and get references etc. The main benefit would be that you would do it in a more reliable way and cross-project.
Why not, the inline assembly is pretty powerful, you capture anything as parameters to specific registers, you can inline rust constants into macro using templating. Or even call a callback
Golden (gate) content
6:05 Wouldn't it be better to use `ctags` for that instead of a regex?
From last I used it, it is *impressively* easy to add custom language support and makes it easier to add integrations with other tools and gives at least _some_ semantic understanding.
(Like distinguishing different types of variables etc)
Also it makes searching cross-project easier.
(I think it should also be possible to re-index your project on inotify events ...)
Edit: Apparently there is a vim-plugin that updates the `ctag` index incrementally on-save!
Nice. Didn’t know about ctags, seems to be very useful. Thank you
@@doomer_haskell It is one of the tools of old from a time where things like LSP didn't exist.
It is very useful for areas where LSPs still don't really exist today!
Thanks ctags is definitely amazing project (I use it rust because lsp is so freaking slow) but the thing I am doing here is not regex based it's just a native vim search by the (a word under cursor) + : and if nothing found just fallbacks to the first occurrence in the file which works incredibly well in any language because you usually define something with a type separated by column (e.g. struct fields, arguments, variables with type and so on)
@@neogoose_btw Yeah maybe I expressed badly what I mean.
What I mean is that you could look at man ctags-optlib to define your own ctag language parser for assembly, so that you can do goto-definition, references etc via ctag. (Though there might already be a asm ctag parser that does what you want)
@@neogoose_btw Okay, maybe I expressed it badly.
What I mean is that ctags lets you define your own languages (see man ctags-optlib) with which you could then add the name being defined + : as pattern and then use that for goto-definition and get references etc.
The main benefit would be that you would do it in a more reliable way and cross-project.
as a non-Rust programmer, inline assembly in Rust feels so zany to me LOL, and "React in assembly"
Why not, the inline assembly is pretty powerful, you capture anything as parameters to specific registers, you can inline rust constants into macro using templating. Or even call a callback
lol why not, rust is llvm based so what is the difference of using assembly comparing to the clang?
you are on arm?
wow nice
a good video
hey that terminal font is beautifullll
(which is that?? )
Its Berkeley Mono v2 Semi condensed