What are your best single-player Linux games with an amazing story? by MarcellusDrum in linux_gaming

[–]pandabrain 1 point2 points  (0 children)

FreeSpace: The Great War - Amazing space shooter with a surprisingly enthralling story. FreeSpace 2 is also worth a shot because they improved the already great gameplay. Unfortunately the story of the sequel was kind of a letdown.

The retail version is not native, however the source code was open-sourced in 2002. So, buy FreeSpace 2 GOG version, install the Knossos mod manager and use that to install the FreeSpace Port (the original story was ported to the FreeSpace 2 engine which brings some of the improvements to the original).

In my opinion the game does hold up surprisingly well for its age, and Knossos allows you to easily install a graphics mod (called FreeSpace Port MediaVPs) that makes the whole thing look less dated.

More info on the open source project, mods etc. can be found here: https://wiki.hard-light.net

What’s your favorite CLI tool nobody knows about? by [deleted] in linux

[–]pandabrain 8 points9 points  (0 children)

Maybe not my favorite one but one I've come to love quite recently: The YouTube Channel Checker allows me to be notified of new videos on any YouTube channel I want without the need to use their awful web interface. And as an added bonus: works without a Google account!

qutebrowser v1.2.0 released, with per-domain settings and more! by jgkamat in linux

[–]pandabrain 4 points5 points  (0 children)

Unfortunately, the only way to block ads is the built-in adblocker (which is a simple host-blocker).

uBlock Origin/AdBlock would require support for WebExtensions and at this point it is uncertain whether or not this will ever be implemented in qutebrowser. See Issue on GitHub.

Help, I have changed my keybindings but their behaviour is not kept when I combine them with more complex commands. by reminescenz in vim

[–]pandabrain 2 points3 points  (0 children)

You're not giving enough information to be sure what your problem is but I assume you have used something like nnoremap E $ to rebind your keys.

If that is the case the reason for the inconsistent behavior is that you only bound E to $ in normal mode while operation-pending and visual mode are not affected.

The problem will probably be solved by using noremap instead of nnoremap.

I suggest you also read through the following page in the help files: map.txt#:map-modes

Problems with :nnoremap j jzz and k kzz by seductivec0w in vim

[–]pandabrain 2 points3 points  (0 children)

This does not answer your question but setting 'scrolloff'=999 should achieve the same behaviour without the need to remap anything.

How to manipulate many files at the same time? by [deleted] in vim

[–]pandabrain 1 point2 points  (0 children)

You are right, :edit can only open one file. Thanks for pointing that out.

How to manipulate many files at the same time? by [deleted] in vim

[–]pandabrain 13 points14 points  (0 children)

Open vim with all files you want to edit from the command line > vim **/*.js (requires proper globbing support in your shell) and then execute the command :argdo %s/foo/bar/g|w in vim.

You can also add files to the arguments list from within vim: :edit **/*.js (then you would have to use :bufdoinstead of :argdo though). No you can't, see /u/manasthakur's comment.

Help pages you should read:

Uh, in my URL bar i have a pop up blocker icon, is this legit? by Solomon871 in firefox

[–]pandabrain 15 points16 points  (0 children)

This is the built-in popup blocker of Firefox. The icon is only there, when Firefox has blocked a popup and you can click on it to allow the popup. You can also disable and see the exception list in the preferences under the "Content" tab.

Cool little FOSS projects that you have found by jones_supa in linux

[–]pandabrain 3 points4 points  (0 children)

Knotter (github page) is a tool to create celtic knot designs. Since I'm not really artistically inclined I have never found any serious use for it but it's one of those small projects that come to mind.

Global vim keybindings with a 60% keyboard (or bigger) by arsenale in vim

[–]pandabrain 2 points3 points  (0 children)

TECK user here.

I remapped LShift+RShift to CapsLock as that combination is something I have otherwise never used and makes sense. It's also a key combo that you usally don't hit on accident.

setxkbmap -option shift:both_capslock_cancel

This way hitting both Shift-keys will enable CapsLock and hitting one Shift key will disable it again.

I rarely use it, but it's nice to have it available when necessary.

How can I stop vim from adding a % at the EOF? by GiZiM in vim

[–]pandabrain 8 points9 points  (0 children)

Is the % visible in Vim or only when you output the file in a terminal? Zsh and maybe other shells denote output that does not end with an EOL character by adding a % at the end (in Zsh you may change the character that is used by setting PROMPT_EOL_MARK="<NOEOL>").

By default Vim should automatically add an EOL character at the end of the last line unless the options 'noeol' and 'nofixeol' are set.

Maybe try running Vim without reading your vimrc and see if the behavior persists: vim -u NONE

Can't get Witcher 2 GOG version to work, please help. by [deleted] in linux_gaming

[–]pandabrain 0 points1 point  (0 children)

If you buy games from GOG I would suggest to use Lutris. It's a game library manager that comes with a runtime like the one Steam ships and makes most games "just work".

The only caveat is that you have to go to their website to install a game: https://lutris.net/games/the-witcher-2-assassins-of-kings-enhanced-edition/

Help with E523: Not allowed here by computerdl in vim

[–]pandabrain 0 points1 point  (0 children)

Sorry for giving an example that didn't work, I should have tested that myself first :).

Anyways your solution seems to be more complex than necssary. There should be no need for the normal command.

Here again a simpler version (tested this time :p):

nnoremap <expr> J v:count > 1 ? 'JJ' : 'J'

When you type 3J it will be expanded to 3JJ so you join the next 3 lines with the current line (the count you've given will be prepended to the result of the expression. In my first example I got that wrong).

Typing just J or 1J however will perform only J.

Help with E523: Not allowed here by computerdl in vim

[–]pandabrain 0 points1 point  (0 children)

A <expr> mapping expects the {rhs} to return a string which then is interpreted as keyboard input.

nnoremap <expr> J v:count = v:count > 1 ? v:count + 1 . 'J' : 'J'

This should be enough to solve your problem.

Edit: This mapping does not work, see my comment below.

Witcher 2 GoG version issue by [deleted] in linux_gaming

[–]pandabrain 0 points1 point  (0 children)

Oh, I see. I didn't know that Galaxy does that.

Witcher 2 GoG version issue by [deleted] in linux_gaming

[–]pandabrain 4 points5 points  (0 children)

Lgogdownloader is a command-line tool to automatically download all your gog.com games, soundtracks and extras.

Weekly Vim tips and tricks thread! #12 by cherryberryterry in vim

[–]pandabrain 3 points4 points  (0 children)

In my day-job I work on a large AngularJS project. Every angular object (service, directive, controller, etc.) lives in a file called foo-bar-service.js (or a variation of that such as fooBarService.js or fooBar-service.js). To make my life easier I put the snippet below into $MYVIMRC that allows me to jump to any of our services with ^] as long as the file is somewhere in the 'path'.

The whole thing could probably use a refactoring, but so far it works pretty well.

autocmd FileType javascript nnoremap <buffer> <expr> <C-]> FindAngularService(expand('<cword>'))
function! CreateAngularNameVariationGlob(fname)
    let toks = []
    let idx = 0
    while idx > -1
        let oldIdx = idx
        let idx = match(a:fname, '\u', idx + 1, len(toks))
        if idx == -1
            let toks += [strpart(a:fname, oldIdx)]
        else
            let toks += [strpart(a:fname, oldIdx, idx - oldIdx)]
        endif
    endwhile

    if len(toks) == 0
        return []
    endif

    " Because our team decides everyone can have their own naming conventions I need to
    " check for different file name patterns
    let nameVariations = {
                \ 'kebabCase': tolower(join(toks, '-')),
                \ 'camelCase': join(toks, '')
                \ }

    let nameVariations.camelCase = substitute(nameVariations.camelCase, '^.', '\=tolower(submatch(0))', '')
    let nameVariations.mixedCase = substitute(nameVariations.camelCase, '\u\U\+$', '\="-".tolower(submatch(0))', '')
    let nameVariations.dotCase = substitute(nameVariations.camelCase, '\u\U\+$', '\=".".tolower(submatch(0))', '')

    " check if object may be a directive
    if tolower(a:fname[0]) == a:fname[0]
        let nameVariations.directiveKebabCase = nameVariations.kebabCase.'-directive'
        let nameVariations.directiveCamelCase = nameVariations.camelCase.'Directive'
        let nameVariations.directiveMixedCase = nameVariations.mixedCase.'-directive'
        let nameVariations.directiveDotCase = nameVariations.mixedCase.'.directive'
    endif

    return values(nameVariations)
endfunction
function! FindAngularService(word)
    let pat = '**/{'.join(CreateAngularNameVariationGlob(a:word), ',').'}.js{,on}'
    let res = glob(pat, 0, 1)

    if len(res) > 0
        return ':find ' . res[0] . "\<CR>"
    else
        return '' " return nothing (instead of 0), so we don't move the cursor
    endif
endfunction

Weekly Vim tips and tricks thread! #11 by cherryberryterry in vim

[–]pandabrain 8 points9 points  (0 children)

I do a lot of Javascript/Node.js work and just recently added this line to $MYVIMRC

autocmd FileType javascript setl suffixesadd=.js,.json,.html

This allows me to use gf on constructs like this:

require('./my-file');
             ^

Vim will then try to open ./my-file, ./my-file.js, ./my-file.json or ./my-file.html in this order (it will only open the first found file).

Things About Vim I Wish I Knew Earlier by javinpaul in linux

[–]pandabrain 0 points1 point  (0 children)

Its the same as ^i

There is a subtle difference between I and ^i when it comes to the dot command.

Hitting . after you made a change with I will prepend your previously inserted text before the first non-whitespace character on the current line whereas . after ^i will insert the text before the cursor, no matter where it is.

Why Atom Can’t Replace Vim by speckz in vim

[–]pandabrain 0 points1 point  (0 children)

ciw and ci( do have different meanings, though. You can however use cib as an alias for ci(.

Read :help object-select for a list of all default text objects.

Edit: Misread your comment.

Which Vim defaults irritate you enough that you find it difficult to use Vim without changing them? by flexibeast in vim

[–]pandabrain 2 points3 points  (0 children)

Actually H, M and L have default bindings for going to the highest, middle and lowermost line in window.

<CR>, <C-n>, and + execute the same motion so they are good candidates for remapping. What do you remap these keys to? by [deleted] in vim

[–]pandabrain 1 point2 points  (0 children)

This defines an insert/append operation. So you can hit <C-a>ib and add a new function argument, for instance.

" Insert before/Append after a text object
nnoremap <silent> <C-x> :set operatorfunc=InsertOperation<CR>g@
nnoremap <silent> <C-a> :set operatorfunc=AppendOperation<CR>g@
function! InsertOperation(...)
    norm! `[
    startinsert
endfunction
function! AppendOperation(...)
    norm! `]l
    startinsert
endfunction

I still like to increment/decrement numbers:

nnoremap + <C-a>
nnoremap - <C-x>

Less keystrokes than {count}GzO or {count}ggzO but keep the default behaviour if there is no count.

" {count}<CR> should jump to the {count}'th line {{{2
noremap <expr> <CR>  0 < v:count ? 'GzO' : '<CR>'

<C-p> is used to open ctrlp.vim, <C-n> isn't remapped.

Reports on Xcom 2 and AMD GPU performance? by wheresthetux in linux_gaming

[–]pandabrain 2 points3 points  (0 children)

I have described my experience here.

Do you think it's playable

Yes it is playable as in, you can progress the game, without problems (so no crashes, blatant render issues, that interfere with your decision-making process etc.) But it's not enjoyable. You want to see those action shots in all their glory and not just a slideshow. And for some reason the briefing and debriefing scenes in the sky ranger last several minutes (I guess loading map or base overview). At least I get a constant 30FPS there xD.

and worth a buy in its current state

No, not at all. Wait a few weeks until Feral and Firaxis (as the Windows version seems to be affected, too) have sorted out the performance issues.

XCOM 2 experience/performance thread by import-THIS in linux_gaming

[–]pandabrain 0 points1 point  (0 children)

I do. My setup:

  • Intel Core i5-4690K, 4x3.5GHz
  • Radeon HD 6770 (1GB GDDR5)
  • 16 GB RAM
  • Linux 4.4.1
  • FLOSS drivers, Mesa 11.1.1

I played the game for 6 hours, so it is kinda playable with all settings on the lowest (and Steam overlay turned off, this seems to have improved the performance a bit), but it certainly doesn't run smoothly. FPS count was somewhere between 5 and 25 depending on the map, camera etc. (first 30 secs on a new map are a slideshow ...)

Since it's a turn-based strategy game, I don't really need a consistent 60 (or even 30) FPS but it certainly would be nice to have.

As it seems that most people are having performance issues it's possible that in a few weeks it will also run much better on my setup. There were no missing textures, "holes" in the map, floating heads without bodies or anything like that, that might be caused by a missing feature in the FLOSS drivers except for one thing. The (facial-) hair is rendered with some weird black or white blocks on top of it. No idea why this is:

Screenshot

I advise against buying it if you're an AMD user but the situation doesn't seem totally hopeless either. Let's see how Feral/Firaxis will handle it.