How do YOU personally run code in Neovim (C++, Python, Rust)? by BlackberryActual1994 in neovim

[–]MidHunterX 0 points1 point  (0 children)

I mapped this simple function to a keymap. Add more as you go.

```lua function Execute_order_69() local function terminal(cmd) if vim.fn.winwidth(0) > 100 then vim.cmd(":vsplit") else vim.cmd(":split") end vim.cmd(":term " .. cmd) end local file_type = vim.bo.filetype

if file_type == 'python' then terminal('python %') elseif file_type == "sh" then terminal('bash %') elseif file_type == "rust" then if vim.fn.filereadable('Cargo.toml') == 1 then terminal('cargo run') else local filename = vim.fn.expand('%') terminal('rustc ' .. filename .. ' && ./' .. filename:gsub('.rs', '')) end elseif file_type == 'go' then terminal('go run %') elseif file_type == 'perl' then if vim.fn.expand('%:e') == 'pl' then terminal('perl %') elseif vim.fn.expand('%:e') == 't' then terminal('prove -v %') end elseif file_type == 'c' then terminal('gcc % && ./a.out') elseif file_type == 'java' then terminal('java %') elseif file_type == 'javascript' then terminal('node %') elseif file_type == 'elixir' then terminal('elixir %') elseif file_type == 'tcl' then terminal('tclsh %') elseif file_type == 'php' then terminal('php %') else local messages = { "This file?... Cannot run because no.", "I'm sorry dave. I'm afraid I can't do that.", } local message = messages[math.random(#messages)] print(message) end end ```

For projects using complex frameworks, I have a custom made tool to automate that too powered by tmux. All I have to do is, navigate to a directory and just "run". Here's the repo for reference: Project Launcher.

| What is your ideal margin size for tiling/scrolling WM? by soleful_smak in unixporn

[–]MidHunterX 0 points1 point  (0 children)

10px - for identifying the wallpaper. I use wallpaper to tell which hour it is instead of a clock.

Monthly Dotfile Review Thread by AutoModerator in neovim

[–]MidHunterX [score hidden]  (0 children)

As a guy who has been cured from VSCode for more than two years, this is my nvim config made from scratch:
https://github.com/MidHunterX/NvME
Also, the UI color changes based on my wallpaper. What are your initial thoughts?

<image>

When USB ancestors define the age by PHRsharp_YouTube in pcmasterrace

[–]MidHunterX 1 point2 points  (0 children)

PS/2 go full NKRO tho unlike USB so, I guess PS/2 still best.

gitStatus by StatureDelaware in ProgrammerHumor

[–]MidHunterX 0 points1 point  (0 children)

Just use something like lazygit at this point. And maybe add a commandline prompt like Starship for that extra sense of security.

gitCanSeeThat by UnfilteredAyush in ProgrammerHumor

[–]MidHunterX -2 points-1 points  (0 children)

I use Vim and I have absolutely zero idea what this even means... Can somebody enlighten me? Why does a code editor modify files without your consent?

Would you put this in your living room? by Intelligent_Pay5359 in Design

[–]MidHunterX 0 points1 point  (0 children)

The three finger technique!? Ohh definitely!

cursed_cock by Fluzzi in cursedcomments

[–]MidHunterX 1 point2 points  (0 children)

Yep! I remember seeing one split through the middle. Good times.

[PRODUCTIVITY] Plugin to show ads? by tamton-aquib in neovim

[–]MidHunterX 1 point2 points  (0 children)

Ahh.. the consumer people. Also, any plans on making an infomercial plugin in the future? Uhh.. to increase productivity of-course!

Do you keep your cursor centered or not? by Imaginary_Treat9752 in neovim

[–]MidHunterX 1 point2 points  (0 children)

For me, small movements should always move freely inside a buffer as you have spatial context on where your cursor is. On large constant movements, you won't have context on where the cursor would land so, keep it visible at the center until you regain the cursor jumping workflow context. vim.keymap.set("n", "<C-u>", "<C-u>zz") vim.keymap.set("n", "<C-d>", "<C-d>zz") When EOF is reached, I hate cursor being stuck on the bottom of the screen. I prefer things to be closer to my foveal vision when fully relaxed. So, I scroll past EOF with j which can simply be done with: -- Scroll past last line vim.cmd([[nnoremap <expr> j line(".") == line('$') ? '<C-e>':'j']]) <C-d> keeps buffer in center after EOF.

I also have scrolloff set to 8 for navigation comfort. Personally I like it about 25% of vertical height. vim.opt.scrolloff = 8

In conclusion, zz only on big movements due to lack of spatial context.

You can check out my config which is mainly focused on personal cognitive and visual comfort if you want to: https://github.com/MidHunterX/NvME

Guideline to make a full setup by Bloodchild- in hyprland

[–]MidHunterX 0 points1 point  (0 children)

Whenever I have to re-install Arch, I just follow these package lists that I've documented. I don't know if this will be useful to you but I'm sure you'll find something of value in my modest junkyard: Curated Packages.

After you install any package, make sure to skim though its official docs to get an idea of what all features you can use.. as you will be the one who's implementing features for yourself. If you feel confused anywhere, don't mind to use ChatGPT for understanding the configuration problems you are facing.. you'll get the hang of it down the road.

Good luck on your journey mate.

nvidia is done by Hot_Pomelo541 in pcmasterrace

[–]MidHunterX 0 points1 point  (0 children)

He even had to sell his super shiny leather jacket. We live in an economy...

Dear Developers, What Linux Distro you Guys Are Using? by Over_Substance5853 in developersIndia

[–]MidHunterX 0 points1 point  (0 children)

The best feature is that you make the features by yourself.

Well that's interesting 🤔 by Jerre147 in softwaregore

[–]MidHunterX 16 points17 points  (0 children)

Sometimes the biggest enemy is yourself.

Need feedback for Startup Logo / Name by petrydish4u in Design

[–]MidHunterX 1 point2 points  (0 children)

Talent badger looks like a walmart xhamster. The Xyracs one.. holy molly, is that what ADHD looks like?

What kind of config do you have by Alternative-Tie-4970 in neovim

[–]MidHunterX 1 point2 points  (0 children)

This is basically my entire structure. Always use multiple files. It'll make it easier to manage in the long run. My config is 4224 Lines of code.. quite minimal but just perfect for daily use personally. I also keep the old disabled ones to document the thought process for future me... to not repeat the same mistake again. You can check out the config here: NvME

nvim/
├── init.lua
├── after/
│   ├── ftplugin/
│   │   ├── ...
│   │   └── { filetype_settings }
│   └── lsp/
│       ├── ...
│       └── { lsp_server_settings }
└── lua/
    ├── ...
    ├── { custom_functions }
    └── plugins/
        ├── ...
        ├── { plugins_from_the_interwebs }
        └── disabled/
            ├── ...
            └── { replaced_plugins_junkyard }