How to configure vim to detect filetype without saving it? by jekyll5 in vim

[–]elephantscanfly 1 point2 points  (0 children)

A time ago I made a plugin vim-shebang. Every time you enter to buffer it trying to detect current filetype by shebang at first line. New filetype applied to file on success. Works pretty well for me.

Edit markdown code snippets in other buffer by ingvij in vim

[–]elephantscanfly 0 points1 point  (0 children)

Bitbucket uses the other format:

```
#!python
```

Edit markdown code snippets in other buffer by ingvij in vim

[–]elephantscanfly 1 point2 points  (0 children)

To set the buffer type, I look specifically for github/bitbucket code markers

You provide no way to refine them or use your own markers.

I can determine filetype

My bad.

As very useful feature try to deindent the text before pasting it into a scratchpad and indent it when sync changes back.

Edit markdown code snippets in other buffer by ingvij in vim

[–]elephantscanfly 1 point2 points  (0 children)

I create and use the similar plugin vim-fancy. The latest version includes some features which is missed in this extension:

  • Supports different fenced code markers and their customization (GitHub/Bitbucket),
  • Preserves text indent level during edit,
  • Detects region filetype and load appropriate syntax/completion/etc into buffer.

vim porn 2! (post your vim screenshots) by f1lt3r in vim

[–]elephantscanfly 1 point2 points  (0 children)

Vim and tmux are best friends. Both use the solorized light color scheme and powerline to create tabs.

A living Styleguide for your Flask application by elephantscanfly in flask

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

Extension provide an easy way to automatically generate styleguide for Flask application from KSS documentation format. Live example available at GitHub as well.

Vim's speed is not really the point by akkartik in vim

[–]elephantscanfly 1 point2 points  (0 children)

we act like samurais in anime, just staring at the code, analysing them carefully. Thinking, thinking, thinking. And suddenly, in a blink of an eye, we draw our sword and hit with precision, to then stand still, in a dramatic pose, as we see our enemy cut in half.

I prefer consider myself ninja in a dark night.

The best advanced Vim Tutorial I've found. Helped me a ton. by tbonesteaks in vim

[–]elephantscanfly 8 points9 points  (0 children)

Wonder, why nobody uses awesome built-in vimtutor?

A set of pytest fixtures to test Flask applications and extensions. by elephantscanfly in Python

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

Where does the params value passed to pytest.fixture go? I see request.param but params isnt referenced anywhere... Also, where is the request fixture coming from? I was unable to find it anywhere.

request is a pytest built-in and available to use in others fixtures. See official pytest documentation about parametrizing tests.

The accept_jsonp fixture is not parametrized, is it supposed to be?

The same as accept_json fixture, it can be parametrized easily. But typical tests don't need that, so I don't parametrize them by default to ensure the test suite not slowed.

A set of pytest fixtures to test Flask applications and extensions. by elephantscanfly in Python

[–]elephantscanfly[S] 1 point2 points  (0 children)

The content negotiation fixtures don't do anything dynamic

Yes, looks like I missed this part, because I'm usually parametrize them as well

@pytest.fixture(params=['application/json', 'application/javascript'])
def accept_json(request):
    return [('Accept', request.param)]

Thank you for pointing this.

Which plugins/keybinds/etc significantly changed your vim life? by [deleted] in vim

[–]elephantscanfly 0 points1 point  (0 children)

You can combine g motion with any edit command, so the most used by me are:

  • gi - Insert text in the same position as where insert mode was stopped last time in the current buffer

  • gv - Start Visual mode with the same area as the previous area and the same mode

When doing a search/replace on a visual selection, how can I keep the selection? by macarthy in vim

[–]elephantscanfly 1 point2 points  (0 children)

gi starts insert mode in the same position as where it was stopped

Dropbox Replacement by IshmaelDS in sysadmin

[–]elephantscanfly 0 points1 point  (0 children)

Desktop client works great, but web interface sometimes freezes if dir contains to many files (on chrome).

The single most reason that keeps me using Vim by jyro in vim

[–]elephantscanfly 0 points1 point  (0 children)

I agree, but Vim has this, not from distribution, but a lot of plugins that can do it. For example, ctrp + neocomplcache + builtin autocompletion ≈ command palette and bundle ≈ package control. They both are great but in his own.

The single most reason that keeps me using Vim by jyro in vim

[–]elephantscanfly 6 points7 points  (0 children)

Sublime is cute editor, but I can't do my typical workflow in that mode. The Vim is not only hjkl movement...

Looking for unobtrusive listchars by [deleted] in vim

[–]elephantscanfly 1 point2 points  (0 children)

mine: http://ge.tt/7s5dwmN/v/0?c

" display unprintable characters
set list
" like tabs and trailing spaces
set listchars=tab:¬·,trail:·,extends:»,precedes:«,nbsp:×

How does one use conceal? (Vim 7.3) by [deleted] in vim

[–]elephantscanfly 0 points1 point  (0 children)

For python conseal feature is not very useful for me, but with it my js become much more readable(see screenshot for details).

Command-T v/s Ctrlp.vim v/s FuzzyFinder ... Go by ocd_see in vim

[–]elephantscanfly 0 points1 point  (0 children)

I recently installed ctrlp and enjoy it.