ctags | A maintained ctags implementation | Text Editor library
kandi X-RAY | ctags Summary
kandi X-RAY | ctags Summary
Universal Ctags (abbreviated as u-ctags) is a maintained implementation of ctags. ctags generates an index (or tag) file of language objects found in source files for programming languages. This index makes it easy for text editors and other tools to locate the indexed items. Exuberant Ctags (e-ctags) maintained by Darren Hiebert, the ancestor of Universal Ctags, improved traditional ctags with multi-language support, the ability for the user to define new languages searched by regular expressions (called optlib in Universal Ctags), and the ability to generate emacs-style TAGS files. But the activity of the project unfortunately stalled. Universal Ctags has the objective of continuing the development of Exuberant Ctags. Reza Jelveh reza.jelveh@gmail.com initially created a personal fork of Exuberant Ctags on GitHub. As interest and participation grew, it was decided to move development to a dedicated project as Universal Ctags. The goal of this project is to maintain a common/unified working space where people interested in making ctags better can work together.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ctags
ctags Key Features
ctags Examples and Code Snippets
Community Discussions
Trending Discussions on ctags
QUESTION
I've stumbled upon a quite innovative functionality in editor – ability to TAB-complete symbols from CTags index, on this Asciinema video.
I wonder if there is anything like it available for Vim? I've been using many completion engines like eg. CoC, however none of them seems to offer what NeoMCEdit does. Is there such plugin for Vim?
...ANSWER
Answered 2021-Jun-15 at 21:01Basic keyword completion, :help i_ctrl-p
/:help i_ctrl-n
, already does that out of the box because of the default value of :help 'complete'
.
Alternatively, you can use your tags
files as exclusive source with :help i_ctrl-x_ctrl-]
.
QUESTION
ANSWER
Answered 2021-Apr-17 at 16:53This answer is for everyone, who wants to install powerline only in vim in the windows terminal (using wsl Ubuntu 20.04). It took me quite some time.
The reason why I had this issue was that glyphs where missing in the windows terminal font. I tried to install the powerline fonts according to the documentation(https://powerline.readthedocs.io/en/latest/installation/linux.html#fontconfig) as @romainl suggested but that didn't work. Furthermore I tried to install all powerline fonts from the github(https://github.com/powerline/fonts), I ran both the installation scripts. The one for windows in the powershell console according to this blog() and the one for Linux on the Ubuntu WSL Machine according to the documentation. Didn't work either.
Then I stumbled upon a blog post of Microsoft(https://docs.microsoft.com/en-us/windows/terminal/tutorials/powerline-setup), where the person installed a theming framework oh-my-posh. However, I neither wanted to install a theming framework nor a special version of git. Furthermore I only wanted to install powerline in vim not in my whole console. This was the moment when I asked myself: did I miss something? And indeed I did catch a little detail. The answer was to install a the Cascadia Mono PL font (https://github.com/microsoft/cascadia-code/releases) which includes the missing glyphs. Just download the zip and double click on the font. Furthermore I had to set the fontface in the setting.json of the windows terminal (which can open with pressing (CTRL + ,
) in the terminal). Your settings should look something like this:
QUESTION
I am setting up neovim, with CoC.
It seems to work well, but with one big problem: My diagnostic windows are very large
I am not sure why this is. I would expect this to be only a few lines. Ideally, it should show up somewhere not directly over the code, but I'm not sure how to configure this.
This is my neovim config:
...ANSWER
Answered 2021-Apr-01 at 20:16Problem was
QUESTION
I think I knew this but forgot. I tried :ts
or g]
but it doesn't work as I want.
Many times I use vim to analyze source codes. I use gf
(when cursor is in a file name, if I press gf
, the editor opens the file), or g]
or ctrl-t
a lot. (with tags file generated by ctags, when cursor is on a variable or type name, pressing g]
jumps to that location, letting me select from candidates when there are many candidates, and ctrl-t
makes me go back.)
After many such operations, sometimes I want to go back to a specific {file,line_number}
location that I recently visited. (gi
, go
incrementally goes forward or backward).
I forgot, but for this purpose, there is a command to list up the locations showing the locations, my current location shown in the middle so I can choose from +3 or -2 (0 is my current location). What is that command? (Just doing :rew
goes to the first file.)
ANSWER
Answered 2021-Mar-27 at 09:25(
gi
,go
incrementally goes forward or backward)
gi
and go
don't do that. You must be thinking about and
, which get you through the "jump list".
The command you are looking for is :jumps
and it is documented under :help jump-motions
, like and
.
(Just doing
:rew
goes to the first file.)
Indeed, the argument list and the jump list are totally unrelated.
QUESTION
In VS Code, there's a nice utility where I can right-click a keyword and it will allow me to view where that variable/function/macro/etc. is declared, defined, or used. For example, let's say in the following code:
I want to goto
the place in the file (stdio.h
) that declares this function. Is there a simple way where I can 'follow a file/function' in vim to be able to view this information upstream?
For reference, I do have ctags
installed and my stdlib
is located at:
ANSWER
Answered 2021-Jan-25 at 07:30Yes, use the tag operation. If you have generated a tags
file of the set of files you are interested in. The ctags
command can generate it for C and C++.
Then, in the source code, position vim's cursor on the symbol to look up and press ctrl-]
character.
===== addendum =====
QUESTION
I'm looking to write foos,bars,bazs by using a custom language in ctags. It works fine, I
can jump to the tag but I'm only allowed to have one unique tag name. I would
like to be able to jump through all the tags in different files with a tag named
todo1. Ctags is not generating more than one of the same tag name. If I fix this then the next question would be how to jump in vim to the same tag names? I presume :tn
probably would not work because I've tried having the same tag names in asciidoc in the past.
For example:
[todo1] This is something important in some/file/path/foo.txt
[todo1] This is something important in another/path/bar.txt
[foo] Some other foo.
My ctags config file is
...ANSWER
Answered 2021-Jan-17 at 17:56The answer is very simple yet many people don't know this so I'm going to post the answer so that it can help someone out in the future.
I'm not sure if ctags allows for same name tags but it's irrelevant. What you can do is generate your own tags as explained in :help tags-file-format
. This can be accomplished with a script containing less than 20 lines of code with a program like rip grep or you can use vimwiki plugin which implements this feature.
Here is an example of a simple tags file that jumps to bar:
QUESTION
I am trying to generate tags for Go projects for vim. As ctags does not have native support for go I am using gotags for it. I wrote a small vim function to check if the file is .go and if so to use the gotags and not ctags:
...ANSWER
Answered 2021-Jan-12 at 16:29It seems I had a typo in the version in my vimrc as I tried again with the first version posted here and it worked:
QUESTION
Does anyone have a simple text list or regex of all default JavaScript commands, functions, build-ins and/or keywords?
I am writing an AI to detect malicious web calls. To make it easier for the AI to learn I am pre detecting SQL, Unix etc.
What I have:
...ANSWER
Answered 2020-Dec-30 at 14:10const js_commands = /\b(?:abstract|afterprint|AggregateError|alert|animationcancel|animationend|animationiteration|animationstart|arguments|Array|ArrayBuffer|async|AsyncFunction|AsyncGenerator|AsyncGeneratorFunction|Atomics|await|beforeprint|beforeunload|BigInt|BigInt64Array|BigUint64Array|Block|blur|Boolean|boolean|break|byte|cancelAnimationFrame|cancelIdleCallback|case|catch|char|class|clearImmediate|clipboardchange|close|confirm|const|continue|convertPointFromNodeToPage|convertPointFromPageToNode|copy|copy_event.clipboardData|crypto|customElements|cut|cut_event.clipboardData|DataView|Date|debugger|decodeURI|decodeURIComponent|default|delete|devicemotion|deviceorientation|devicePixelRatio|dialogArguments|do|document|DOMContentLoaded|double|each|else|Empty|encodeURI|encodeURIComponent|enum|error|eval|EvalError|event|export|extends|external|false|final|finally|find|float|Float32Array|Float64Array|focus|for|frameElement|frames|fullScreen|function|gamepadconnected|gamepaddisconnected|Generator|GeneratorFunction|get|getAttention|getAttentionWithCycleCount|getComputedStyle|getDefaultComputedStyle|getSelection|globalStorage|globalThis|goto|hashchange|history|home|if|implements|import|import.meta|in|Infinity|innerHeight|innerWidth|instanceof|int|Int16Array|Int32Array|Int8Array|interface|InternalError|Intl|Intl.Collator|Intl.DateTimeFormat|Intl.DisplayNames|Intl.ListFormat|Intl.Locale|Intl.NumberFormat|Intl.PluralRules|Intl.RelativeTimeFormat|isFinite|isNaN|isSecureContext|JSON|label|languagechange|length|let|load|localStorage|location|locationbar|long|Map|matchMedia|Math|maximize|menubar|message|messageerror|minimize|moveBy|moveTo|mozAnimationStartTime|mozInnerScreenX|mozInnerScreenY|mozPaintCount|name|NaN|native|navigator|new|null|Number|Object|of|offline|onappinstalled|onbeforeinstallprompt|ondevicelight|ondevicemotion|ondeviceorientation|ondeviceorientationabsolute|ondeviceproximity|ongamepadconnected|ongamepaddisconnected|online|onorientationchange|onpaint|onuserproximity|onvrdisplayactivate|onvrdisplayblur|onvrdisplayconnect|onvrdisplaydeactivate|onvrdisplaydisconnect|onvrdisplayfocus|onvrdisplaypointerrestricted|onvrdisplaypointerunrestricted|onvrdisplaypresentchange|open|openDialog|opener|orientation|orientationchange|origin|outerHeight|outerWidth|OverconstrainedError|package|pagehide|pageshow|pageXOffset|pageYOffset|parent|parseFloat|parseInt|paste|paste_event.clipboardData|performance|personalbar|pkcs11|popstate|postMessage|preventDefault|print|private|Promise|prompt|Proxy|public|RangeError|ReferenceError|Reflect|RegExp|rejectionhandled|requestAnimationFrame|requestFileSystem|requestIdleCallback|resize|resizeBy|resizeTo|resolveLocalFileSystemURL|return|returnValue|routeEvent|screen|screenLeft|screenTop|screenX|screenY|scroll|scrollbars|scrollBy|scrollByLines|scrollByPages|scrollMaxX|scrollMaxY|scrollTo|ScrollToOptions|scrollX|scrollY|self|sessionStorage|set|Set|setCursor|setImmediate|setResizable|SharedArrayBuffer|short|showModalDialog|sizeToContent|speechSynthesis|static|status|statusbar|stop|storage|String|super|switch|Symbol|synchronized|SyntaxError|target|this|throw|throws|toolbar|top|transfer|transient|transitioncancel|transitionend|transitionrun|transitionstart|true|try|TypeError|typeof|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|undefined|unhandledrejection|unload|updateCommands|URIError|value|var|visualViewport|void|volatile|vrdisplayactivate|vrdisplayblur|vrdisplayconnect|vrdisplaydeactivate|vrdisplaydisconnect|vrdisplayfocus|vrdisplaypointerrestricted|vrdisplaypointerunrestricted|vrdisplaypresentchange|WeakMap|WeakSet|WebAssembly|WebAssembly.CompileError|WebAssembly.Instance|WebAssembly.LinkError|WebAssembly.Memory|WebAssembly.Module|WebAssembly.RuntimeError|WebAssembly.Table|while|window|with|yield)\b/gi
QUESTION
My gVim 8.2 (Windows 10) always get stuck during startup, showing the window below.
Looking at Windows Task Manager, it shows ctags.exe
consuming ~30% of CPU, and 40MB of RAM.
I have to close it manually (or wait for 10+ minutes!), then the program starts...
How can I make it go straight to the program without showing this?
NOTE: Also, my Vim (not gVim) doesn't even show anything (only a black window with a blinking cursor, no matter if I call it from the terminal or not). Both are 64bit, but the same did happen with the 32bit version.
...ANSWER
Answered 2020-Nov-11 at 03:46You have a plugin or autocommand in your Vim config that automatically runs ctags. This isn't default behavior.
QUESTION
I'm just trying to figure out why does the following command not work:
...ANSWER
Answered 2020-Nov-05 at 07:15Because ctags
doesn't even apply the --exclude
block. Just try:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ctags
To build with Autotools (Autoconf, Automake, and Libtool) on GNU/Linux, OSX, or Windows 10 WSL,. See docs/autotools.rst for more information. To build on Windows, see docs/windows.rst for more information. To build on OSX, see docs/osx.rst for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page