Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Code to the terminal for execution #2823

Closed
biplab37 opened this issue May 5, 2024 · 1 comment
Closed

Send Code to the terminal for execution #2823

biplab37 opened this issue May 5, 2024 · 1 comment

Comments

@biplab37
Copy link

biplab37 commented May 5, 2024

Is your feature request related to a problem? Please describe.
I am using Julia and want to be able to send a line or a visual block of code to the terminal where I can execute the code. Is there a way to do it with the default term in nvchad?

@Vaniog
Copy link

Vaniog commented May 5, 2024

map("n", "<C-l>", function () require("nvchad.term").runner {
    pos = "sp",
    cmd = vim.fn.getreg('"'),
    id = "ekk",
    clear_cmd = false
  } end)

This example maps executing code from " register, so you can yank and run with <C-l>
Code mostly from here https://nvchad.com/docs/config/nvchad_ui
But for some reason, i cant run multiple lines

@siduck siduck closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants