Comments (8)
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.
So the mapping worked and you only need to work on the code you want to call:-)
from astronvim.
@vnbubba I don't really program in c or cpp, can you tell me what would you like to know about them?
from astronvim.
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.
@vnbubba Did the solution given by @hunger work for you?
from astronvim.
from astronvim.
@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.
There is no need to wait for AstroVim! You can just add all the plugins you need yourself:-)
from astronvim.
Related Issues (20)
- nvim-treesitter[javascript]: Could not create tree-sitter-javascript-tmp HOT 1
- Where is the AstroNvim v3 documentation? HOT 3
- AstroNvim displays an error about null-ls HOT 1
- quit sometimes is very slow HOT 10
- Error detected while processing WinClosed Autocommands for "*" HOT 2
- C - Nvim: Error detected while processing BufReadPost Autocommands for "*" HOT 2
- Resort autocompletion (python) HOT 1
- toggleterm requires an extra click when triggering with <F7> HOT 2
- Error when executing the :Format command HOT 2
- How to change mapping for Gitsigns? HOT 1
- neovide define keymap not work on v4.2.0 HOT 2
- Recurring error with HTML file HOT 6
- Error loading LuaSnip after installing astronvim HOT 4
- Tab character work as spaces HOT 17
- How to configure c++ tools? HOT 2
- How to update core plugin pin commit? HOT 2
- Error on `AstroFile` upon fresh installation HOT 2
- Annoying behavior when completing a code snippet with TAB HOT 3
- autochdir issue HOT 6
- AstroNvim 4.0 version, shellcheck not displayed and not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astronvim.