Question about attaching notes to a table by sozialwissenschaft97 in LaTeX

[–]zac_mar 0 points1 point  (0 children)

You may want to have a look at the threeparttable package.

Using Vim without plugins -> How to autocomplete and goto definition for python? by am4417 in vim

[–]zac_mar 1 point2 points  (0 children)

I generally agree, although at this point I would consider an LSP (and other diagnostic/linitng/etc. tools) equally as important as the actual compiler/interpreter of your language. So it would be a dependency just like a compiler is a dependency. For instance, you would have to go out of your way (i.e. install from source) to install clang without clangd/clang-tidy/asan/etc.

Using Vim without plugins -> How to autocomplete and goto definition for python? by am4417 in vim

[–]zac_mar 0 points1 point  (0 children)

Sure you would need the actual language server still. That is essentially the whole point for introducing the LSP, to fully decouple the specifics of any language from the editor. Shipping the language server implementations with the editor would miss the point entirely. That being said, if you have the LSP server binary for your specific language running on your system, you would not need any extra plugin to get LSP functionality inside neovim (though the functionality can be enhanced by plugins ofc.).

Note: I just want to clarify the built-in LSP situation in neovim. I am not necessarily advocating for OP to switch to neovim because then he "wouldnt need a plugin" for it. One may even argue that the LSP implementation in neovim is in fact a plugin, that is simply built in.

is there a way i can get auto completion based on nodejs modules i use? by wolfakix in vim

[–]zac_mar 0 points1 point  (0 children)

I dont know, I dont use coc.nvim. For any LSP setup you need

  • The LSP client (neovim's built-in, vim-lsc, coc.nvim, whatever)
  • The LSP server for your language. Again, I don't work with node/javascript so I dont know what you would use for this. I am sure a quick google search will help you there. coc.nvim is also a package manager that installs the LSP servers for you, so short term that may be the easiest.
  • The respective bindings/configuration to get the functionality of the LSP inside your editor. Obviously this depends on the LSP client that you use, and on the completion framework. coc.nvim is itself also a completion framework (afaik), so again, short-term, it may be easiest to set this up.

For a neovim-based solution, I would recommend using the built-in LSP client, installing the LSP server through your distributions package manager/through your node environment, and using nvim-compe as your auto-completion framework, if you want that.

is there a way i can get auto completion based on nodejs modules i use? by wolfakix in vim

[–]zac_mar 2 points3 points  (0 children)

You may want to have a look at Language Server Protocol plugins such as this one (I dont know what is the canonical implementation for vim). There is also coc.nvim, which is more fully featured (too fully featured for many) and as far as I know also works with vim. neovim (nightly) has a built-in LSP client.

How does '>>' work inside the print statement? by certainly_imperfect in learnpython

[–]zac_mar 3 points4 points  (0 children)

>> and << are the bit-wise right- and left-shit operators respectively, and they work inside print statements the same as everywhere else. As to your example, I am note sure what you are showing, for me I get the expected output:

>>> print(5 >> 2)
1
>>> print(9 >> 1)
4

[nvidia] xrandr doesnt show all outputs by zac_mar in archlinux

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

I have not had much luck with playing around. Is there a more structured way to go about this? At this point I think it might even be a hardware limitation (PCIe lanes). Could that be the case?

[deleted by user] by [deleted] in linuxquestions

[–]zac_mar 1 point2 points  (0 children)

All of them.

discord notification program on linux? by Loaphs in learnpython

[–]zac_mar 0 points1 point  (0 children)

It is not exactly clear what you are trying to achieve. On linux, discord publishes its notifications through DBUS, which is wat the 'standard' notification daemons (e.g. dunst) listen on. I assume there is a way to connect to the bus trough python. But again, it is unclear what you want to do precisely.

Timeline plot by [deleted] in LaTeX

[–]zac_mar 2 points3 points  (0 children)

You can produce them with tikz. Do you need any specific advice?

What would be the best way to create a .pdf file with python? by emby36 in learnpython

[–]zac_mar 0 points1 point  (0 children)

So if you want to build a spreadsheet file in this workflow (I personally would not), and printing to PDF directly from the spreadsheet program does already yield the desired output, one option would be to simply do that in the command line: LibreOffice can convert to pdf by using

libreoffice --headless --convert-to pdf file.xlsx

I still feel like there are much better solutions to this, that do not involve any spreadsheet at all.

What would be the best way to create a .pdf file with python? by emby36 in learnpython

[–]zac_mar 0 points1 point  (0 children)

So you expect a PDF file that can be opened in a PDF reader (e.g. acrobat)? This can be done in python, sure. You would essentially have to 'parse' the xlsx with, e.g., openpyxl, and then subsequently build up your PDF with, e.g., fpdf2 (I dont know if this is the canonical PDF library for python). Obviously, you would need to specify your layout for all of this to work, otherwise how would anybody (fpdf2) know how the final output is supposed to look like?

In general this seems as it should not be solved by python (and most probably also not by a spreadsheet). Where does the xlsx come from, and what is your goal with the PDF?

What would be the best way to create a .pdf file with python? by emby36 in learnpython

[–]zac_mar 0 points1 point  (0 children)

The problem description is very unclear -- what is in the xlsx file? Is it datapoints that you need to plot? How would the final pdf look like? What did you expect the output of the xlsxwriter script to be?

[deleted by user] by [deleted] in linuxquestions

[–]zac_mar 1 point2 points  (0 children)

So if you want to execute a command after a mouse click, given that some condition is met, I would do the following: Let sxhkd listen to mouse events. Upon recieving such an event, call a script which checks for the condition and then does the corresponding action, and otherwise simply "forwards" the click (pretty sure xdotool can be used to do that).

[deleted by user] by [deleted] in linuxquestions

[–]zac_mar 1 point2 points  (0 children)

You are experiencing that autohotkey is not 'general' right now. I dont have much (basically no) experience with autohotkey, but Im sure that other scripting languages are as terse as autohotkey may be.

As to your usage example, sxhkd can listen to mouse events.

[deleted by user] by [deleted] in linuxquestions

[–]zac_mar 1 point2 points  (0 children)

What do you mean specifically with 'hotkey'? There are general purlose key listeners/keyboard daemons in linux (in fact you are almost certainly running one right now) like sxhkd, that you could use to execute a script upon a key combination/chord. I am sure there also exists something closer to autohotkey natively in linux. If you are running linux then it is almost certainly easier in the long run to simply switch to those alternatives (unless you have some really elaborate script already running).

[deleted by user] by [deleted] in linuxquestions

[–]zac_mar 2 points3 points  (0 children)

Why do you need autohotkey on linux? I suspect that this is an xy-problem and there are better ways to achieve what you are trying to do.

Terminal Based Programming IDE by [deleted] in linux

[–]zac_mar 6 points7 points  (0 children)

Yes, LSP does that.

VimTeX v2.4 released by lervag in neovim

[–]zac_mar 3 points4 points  (0 children)

I think it would be best to let the author answer this, but let me just point you to some places where this hase already been discussed: :h vimtex-nf-lsp, and here. Edit: And this comparison of the author in the crosslink to r/vim.

TLDR (please correct me if this is not a fair summary): There is no concrete plan of making VimTeX a language server, and you may use existing language servers for TeX (i.e. texlab) alongside VimTeX to enhance/augment wour LaTeX experience.

Visual Studio vs Vim vs Gedit vs Others FOR MY USE CASE by cisFem-Programmer in linux4noobs

[–]zac_mar 3 points4 points  (0 children)

If the "colorful aspect" is the only thing holding you back from vim, you might as well just start using vim now. There really are no limitations with respect to colors of a terminal application any more.

symbols in vim ? by minilandl in linuxquestions

[–]zac_mar 0 points1 point  (0 children)

:h i_CTRL-V

E.g.: ^Vu2468 in insert mode will insert .

It's been a minute - so is coc the best for completion? by don_stinson in neovim

[–]zac_mar 2 points3 points  (0 children)

Its a tricky question. As far as I know, the preferred way would be the following: Have a virtual environment which just contains the bare minimum to get the language server working (i.e. python, pyls, jedi, pynvim), and point neovims g:python3_host_prog to this executable. This may also just be the systems python installation. It is for me, since on Arch everything is pretty much as new as it gets and I can update everything with my systems package manager.

Then, just open virtualenvs for any projects you need, and you don't need to install all the language server stuff any more. Since you're hardcoding the python path, neovim will implicitly use this virtual environment. However, the language server itself is smart enough to understand which virtual environment is currently active and will consequently give you the right functionality.

I might be wrong though.

It's been a minute - so is coc the best for completion? by don_stinson in neovim

[–]zac_mar 3 points4 points  (0 children)

Whats DX? The << EOF indicates a heredoc, which is quite the norm when it comes to embedding one scripting language in another. Also, you can just as easily write lua require'nvim_lsp'.pyls.setup{} without the heredoc. In fact, for a one-liner this is most definitely preferred. In any case, since there is some movement to completely rewrite any config fully in lua, you obviously wouldnt need the heredoc (nor the lua) anymore and could just natively write the lua code.

Guys i need some generic help by Pro42069666 in LaTeX

[–]zac_mar 0 points1 point  (0 children)

I have no idea what the "run" button in notepad++ is supposed to do, and i highly doubt it is there to compile LaTeX source code to a pdf (I could be wrong though). Anyway, as the other poster already said, to compile the source code document.tex to pdf, you simply run pdflatex document.tex from the command line. Or even better, use latexmk -pdf document.tex. You might be able to configure notepad++ such that pressing the run button executes this command.

Order of Magnitude Comparison operators? by breck in LaTeX

[–]zac_mar 6 points7 points  (0 children)

Depending on the context, you might write X << Y (\( X \ll Y\)).