Giter VIP home page Giter VIP logo

Comments (8)

hunger avatar hunger commented on May 18, 2024 1

Try

map('n', '<f5>', ':w <bar> !g++ -std=c++17 -O2 -Wall % -o %:r && %:r.exe <CR>', opts)

map is the conveneince function that AstroVim defines for you, the 'n' is the mode (the first 'n' in "nnoremap") and opts be default set "noremap" and "silent" (the "noremap" is the part after the first n of "nnoremap").

Your old version is actually not marked up as silent, so you can try to replace the opts with { noremap = true } -- if that is important to you.

from astronvim.

hunger avatar hunger commented on May 18, 2024 1

So the mapping worked and you only need to work on the code you want to call:-)

from astronvim.

kabinspace avatar kabinspace commented on May 18, 2024

@vnbubba I don't really program in c or cpp, can you tell me what would you like to know about them?

from astronvim.

vnbubba avatar vnbubba commented on May 18, 2024

This is my keymap for run a C file as vimscript but I don't know how convert it to lua.
nnoremap <F5> :w <bar> !g++ -std=c++17 -O2 -Wall % -o %:r && %:r.exe <CR>

from astronvim.

kabinspace avatar kabinspace commented on May 18, 2024

@vnbubba Did the solution given by @hunger work for you?

from astronvim.

vnbubba avatar vnbubba commented on May 18, 2024

@vnbubba Did the solution given by @hunger work for you?

image
May I missed something?

from astronvim.

vnbubba avatar vnbubba commented on May 18, 2024

@vnbubba Did the solution given by @hunger work for you?
https://github.com/CRAG666/code_runner.nvim
https://github.com/skywind3000/asyncrun.vim
Can you add one of these packer for AstroVim? Thanks

from astronvim.

hunger avatar hunger commented on May 18, 2024

There is no need to wait for AstroVim! You can just add all the plugins you need yourself:-)

from astronvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.