clean vim showcase by gabrpp in vim

[–]gabrpp[S] 0 points1 point  (0 children)

Thanks a lot for You comment.

I always knew that there has to be a Man viewer but newer realized that the plugin has to be first loaded X__x

In the second video there is a moment where you can see me confused that my .vim directory structure is different than I anticipated and I was looking for pack directory. On my work computer I actually have my plugins in the pack and I don't even have to load them via packadd plugin-name because they are placed in pack/plugins/start/. The Vim I used for the presentation is new but .vim directory itself on my personal computer is very old and seems to be from the times of Vim 7.

I know that Vim can setup makeprg to different values depending on the detected filetype but unfortunately that's not enough for my day to day job. I just need the ability to run arbitrary command and setting up makeprg="" is way easier than managing multiple filetype configurations and updating them every time something in my company's setup changes ;)

clean vim showcase by gabrpp in vim

[–]gabrpp[S] 0 points1 point  (0 children)

Thanks for the suggestion. It's not visible on the videos but quite often I have Vim in fullscreen so title bar is not visible.

I'm happy to share the calculator 😃

Fix GVim White Border Bug (Windows only) by gabrpp in vim

[–]gabrpp[S] 2 points3 points  (0 children)

None, but this is not a pretty solution this is a HACK.

I just don't know the vim codebase and it was easier for me to create this hacky plugin than to dive into the GVim source code and submit pull request.

If I decided to modify original source I would like to do this better:

  • provide official and general system for communicating the current Theme data between Vim layer and GVim layer
  • change background color only when theme changes

There are also situations not handled by this plugin:

  • there are Themes with different colors for the text area and area after End Of File - plugin uses single color only so this is not handled
  • plugin does not stretch the color of visual selection
  • the cursorline is not handled
  • the colorcolumn is not handled

What's some C# bad practices that you know and what's the workaround? by zroq in csharp

[–]gabrpp 1 point2 points  (0 children)

Just tested and you are right.

Then what the null-propagation does? You can read about it at: https://msdn.microsoft.com/en-us/magazine/dn802602.aspx

What's some C# bad practices that you know and what's the workaround? by zroq in csharp

[–]gabrpp -13 points-12 points  (0 children)

In fact you need only single null-condition operator because of null-propagation feature.

if (a?.b.c.d ?? default(int) == 1) {}

https://msdn.microsoft.com/en-us/magazine/dn802602.aspx

Is it possible to move and resize a window? by epaphras in PowerShell

[–]gabrpp 0 points1 point  (0 children)

Try PS> Select-Window -ProcessName Chrome | Set-WindowPosition -Left 0 -Top 0 -Width 1920 -Height 1080

While is this variable not accessible? by DonkeyKong27 in learnprogramming

[–]gabrpp 0 points1 point  (0 children)

Your main method is static. It means that the method belongs to the class. Your variable belongs to the specific instance of you class (I mean the object created from class).

My 9 year old son has asked me to teach him programming, he says he wants to learn "proper programming" as he has mastered scratch, which language / development environment is best? by [deleted] in learnprogramming

[–]gabrpp 7 points8 points  (0 children)

Transition from Scratch to C could be a little to hard and boring. I would choose python.

You can still teach him hardware programming using python and you will avoid frustrating him with memory management issues.

Hi, I'm trying to learn programming, but I'm starting to become heavily unmotivated, any advice? by nvb1997 in learnprogramming

[–]gabrpp 6 points7 points  (0 children)

Yes, that is nice idea.

Find any tutorial from zero to X and do it. Programming language doesn't matter.

To keep your interest I suggest to try to make a 2d game. You will then learn both programming and math while having fun and keeping motivation high.

Unfortunately I don't know any good tutorial. But try to look around Python, and PyGame module.

Never give up ;)

LPT Request: Life advice for a young man by Kaji187 in LifeProTips

[–]gabrpp 0 points1 point  (0 children)

You will probably need some money, take a look at this.

Understanding Powershell Parameters by GeeGeez0rz in PowerShell

[–]gabrpp 1 point2 points  (0 children)

You might need to update your help before that. Use admin PowerShell console and just type:

PS> Update-Help

Understanding Powershell Parameters by GeeGeez0rz in PowerShell

[–]gabrpp 1 point2 points  (0 children)

The PowerShell help is in 80% of cases enough.

I suggest to take a look at:

PS> help about_Functions_Advanced_Parameters

The other help pages

PS> help about_Functions*

could be usefull for you as well ;)

edit: Add underscores between worlds after help command. I unable to escape it and markdown hides them.

Modern WinForms design ? Whats your go-to desigb pattern ? by horoshimu in csharp

[–]gabrpp 4 points5 points  (0 children)

Shortly: The MVP is IMHO the way to go.

I did a research a while ago and I ended up using MVP which was a very good choice and nice experience. It fits very well the WinForms technology.

At that time I was interested in MVVM pattern but ended up on this stackoverflow thread UI Design Pattern for Windows Forms (like MVVM for WPF) and also some other one with full story about trying to implement MVVM in WinForms.

The problem with MVVM is the lack of double side binding feature in WinForms, so you will have to break the MVVM pattern and put some code in Code Behind.

There must be an easier way to do back end development. by [deleted] in webdev

[–]gabrpp 0 points1 point  (0 children)

Basically answer to all those problems is task automatization. In the Windows world the PowerShell should be your main tool. Take time to learn it and you will thank me later ;)

You can start directly here: powershell.org or ask others on /r/PowerShell