一款名为AssemblyForNeovim的Neovim插件在Hacker News上展示,该工具能够在编辑器浮动窗口中实时显示C、C++和Rust源代码对应的汇编指令1。用户可通过特定快捷键触发查看功能,例如使用“ain”命令查看光标所在函数的汇编代码,或通过“:' Asm”命令查看选中行的汇编视图1。此外,该插件支持通过“+”和“-”按键调整优化级别等交互操作1。
在运行环境方面,AssemblyForNeovim依赖系统PATH环境变量中存在的cc/c++或rustc/cargo编译器1。为了更灵活地配置编译选项,该插件还支持读取compile_commands.json文件进行设置1。
A new plugin named "AssemblyForNeovim" has been showcased on Hacker News, offering developers the ability to view assembly code generated from C, C++, and Rust directly within a floating window in the Neovim editor 1. The tool allows users to inspect the output for specific functions or selected lines of code 1.
To function correctly, the plugin requires that compilers such as cc/c++ or rustc/cargo be available in the system's PATH environment variable 1. It supports configuration via compile_commands.json, enabling integration with existing build systems 1. Users can interact with the tool using specific commands: typing ain displays the assembly for the function under the cursor, while :' Asm shows the assembly for visually selected lines 1. Additionally, the optimization level of the generated code can be adjusted dynamically using the + and - keys 1.
评论
还没有评论,欢迎留下第一条。