Linters and fixers: never worry about code formatting again (Vim + Ale + Flake8 & Black for Python)

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 พ.ย. 2024
  • Python linters
    Flake8: flake8.pycqa.o...
    pydocstyle: pypi.org/proje...
    bandit: github.com/PyC...
    mypy: mypy-lang.org/
    Pylint: www.pylint.org/
    Python fixers
    Black: black.readthed...
    Łukasz Langa - Life Is Better Painted Black, or: How to Stop Worrying and Embrace Auto-Formatting: • Łukasz Langa - Life Is...
    Black: editor integration: black.readthed...\_integration.html
    Yapf: github.com/goo...
    autopep8: github.com/hha...
    isort: github.com/tim...
    Setting up (Neo)Vim
    Vim-plug: github.com/jun...
    Ale (Asynchronous Lint Engine): github.com/den...

ความคิดเห็น • 56

  • @ericpellereau2769
    @ericpellereau2769 3 ปีที่แล้ว +2

    Thanks a lot !
    One has to get use to the black transformations of the code, but quickly you realise how convenient and more readable it is

  • @Alex-gb8mk
    @Alex-gb8mk 4 ปีที่แล้ว +10

    I only login to say thank you so much ,this tutorial was explained so clear

    • @yyahn
      @yyahn  4 ปีที่แล้ว

      Thanks! I appreciate it!

  •  2 ปีที่แล้ว +1

    Your video saved me. I was fighting with ALE documentation to find how to enable pylint, black and mypy, and you just showed it effortlessly. And you even explained to me why flake8 is better than pylint in just one video! Cheers, brother!

    • @bkr_418
      @bkr_418 ปีที่แล้ว

      Same here, super helpful, thank you! :)

  • @PaulJacobson
    @PaulJacobson 2 ปีที่แล้ว

    I was struggling with ALE earlier today. This video is super helpful, thank you.

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars 2 ปีที่แล้ว +1

    thanks a lot dude, also your voice is soothing

  • @colasgrassi1374
    @colasgrassi1374 7 หลายเดือนก่อน

    good video with clear indications and explanations thanks !

  • @komi9261
    @komi9261 2 ปีที่แล้ว

    Thank you so much, As a beginner to vim this helped me so much!

  • @markgriswold1807
    @markgriswold1807 4 ปีที่แล้ว +2

    Thanks for sharing! Good, nuanced advice, presented well. Good duration. Subscribed.

  • @zalasyu
    @zalasyu 3 ปีที่แล้ว

    Awesome tutorial. I love you.

  • @TheDanto123
    @TheDanto123 ปีที่แล้ว +1

    What's up guys I have a problem using ALE in vim, the problem is that when I make a mistake programming in python ALE informs me of the error not only in the vim status line but also puts an error message next to the line of code, for example: print('hello) # E: EOL while scanning string literal [syntax].
    the message "# E: EOL while scanning string literal [syntax]" is the one I want to get out of my code and have only ALE show me the error messages in the status line below. how can I solve that? The same thing also happens to me when I'm working on a verilog file

  • @1mayanksuri
    @1mayanksuri 2 ปีที่แล้ว

    Thank you for such a nice video 😀.. it explains all concepts very clear and precisely. 😎

  • @datascileakos1936
    @datascileakos1936 2 ปีที่แล้ว

    Thank you very much.

  • @johnc0de
    @johnc0de 2 ปีที่แล้ว

    Thank you, amazing work!

  • @marloncesar4573
    @marloncesar4573 4 ปีที่แล้ว +4

    """This is a Great video!""" Thanks

  • @stracci_5698
    @stracci_5698 2 ปีที่แล้ว

    This is amazing tysm

  • @BersekViking
    @BersekViking 4 ปีที่แล้ว

    Nice video with good explanations. Thanks!

  • @BrotherKaif
    @BrotherKaif 4 ปีที่แล้ว +1

    Thanks for such an informative video. I will give ALE a go!

    • @yyahn
      @yyahn  4 ปีที่แล้ว

      Have fun!

  • @denizural5390
    @denizural5390 3 ปีที่แล้ว

    Great tutorial 👏👏

  • @martinocrespoalvarez4663
    @martinocrespoalvarez4663 3 ปีที่แล้ว

    Great explanation, thanks!

  • @samantha6670
    @samantha6670 3 ปีที่แล้ว

    Thank you, Ahn
    !

  • @GlibShpychka
    @GlibShpychka 4 ปีที่แล้ว +1

    Thank you, cleared it up for me.

  • @90125iahg
    @90125iahg ปีที่แล้ว

    Super helpflul

  • @chuckchen2851
    @chuckchen2851 3 ปีที่แล้ว

    Black makes life much easier!

  • @yulig.2324
    @yulig.2324 4 ปีที่แล้ว

    very helpful, thanks

  • @qrockz007
    @qrockz007 ปีที่แล้ว

    If your let g:ale_linters lists moe then 1 linters - which one will be used? (all of them sequentially?)

    • @yyahn
      @yyahn  ปีที่แล้ว

      In the case of fixers, it runs them sequentially. So I'd assume that it will run linters sequentially as well.

  • @nikosgeorgakopoulos396
    @nikosgeorgakopoulos396 4 ปีที่แล้ว +1

    Hi, Im new to vim and im currenting using wsl ubuntu. I wanna ask what kind of vim you are using which allows this friendly ui.Thanks!

    • @yyahn
      @yyahn  4 ปีที่แล้ว

      That can be a topic for another video! I use Neovim and Airline plugin for the status bar. yyahnwiki.appspot.com/Vim/Airline (it's been a while so some steps may need to be changed).

  • @deepakpatra4691
    @deepakpatra4691 4 ปีที่แล้ว

    nice tips . thank you!

  • @ariiramanesh6640
    @ariiramanesh6640 4 ปีที่แล้ว +2

    Thank you! Also, how did you get your hjkl to move so quickly?

    • @yyahn
      @yyahn  4 ปีที่แล้ว

      That’s determined by your keyboard repeat delay setting, not vim.

  • @marcospiau123
    @marcospiau123 4 ปีที่แล้ว

    Nice vid! Thanks!

  • @zalavadiaridham
    @zalavadiaridham 2 ปีที่แล้ว

    Perhaps a silly question, what font are you using in neovim? Thanks for the video. It helps a lot!!

    • @yyahn
      @yyahn  2 ปีที่แล้ว +1

      www.nerdfonts.com/font-downloads I've been using Inconsolata, JetBrainsMono, Meslo, Noto.

  • @DanielHf
    @DanielHf 3 ปีที่แล้ว

    thanks a lot.

  • @kevsestrella9314
    @kevsestrella9314 4 ปีที่แล้ว

    awesome vid! it helped me setup ale 😊

  • @omesner
    @omesner 4 ปีที่แล้ว

    Super helpful and clear! Thank you! =D

  • @writetoashishgupta
    @writetoashishgupta ปีที่แล้ว

    Are you running tmux? Nice bottom bar. How can I get that?

    • @yyahn
      @yyahn  ปีที่แล้ว

      I believe that was airline github.com/vim-airline/vim-airline. If you use neovim, now you can probably want to use github.com/nvim-lualine/lualine.nvim

  • @jishcatg
    @jishcatg 4 ปีที่แล้ว

    Well done video!

  • @ulver56
    @ulver56 4 ปีที่แล้ว

    Ty very much!

  • @noyalmartin9729
    @noyalmartin9729 3 ปีที่แล้ว

    when i type flake8 in terminal i am getting this error:
    zsh : permission denied: flake8

    • @yyahn
      @yyahn  3 ปีที่แล้ว

      You probably want to run "which flake8" and check its permission.

  • @rocteur
    @rocteur 4 ปีที่แล้ว

    I enjoyed this, I'm going to try Flake8 and Black for Python. Do you also do Perl ? I'd be interested in your ideas on linters and fixers for Perl.

    • @yyahn
      @yyahn  4 ปีที่แล้ว +3

      ALE seems to support these two linters: github.com/dense-analysis/ale/tree/master/ale_linters/perl I rarely use perl so I don't have a good answer. Sorry!

  • @nraw_
    @nraw_ 4 ปีที่แล้ว

    Thanks for the vid! Do you also use an auto completion library? Which one?

    • @yyahn
      @yyahn  4 ปีที่แล้ว +1

      github.com/Shougo/deoplete.nvim with github.com/deoplete-plugins/deoplete-jedi and github.com/SirVer/ultisnips

    • @TrilokD
      @TrilokD 4 ปีที่แล้ว +1

      @@yyahn Make a quick video about that?
      its really confusing for beginners.

  • @laminlevrai1758
    @laminlevrai1758 4 ปีที่แล้ว

    How does your vimrc file looks like?

    • @yyahn
      @yyahn  4 ปีที่แล้ว +2

      Maybe a topic for a video!

  • @akshathbharathi7376
    @akshathbharathi7376 3 ปีที่แล้ว

    Is it sublime? You are using?

    • @yyahn
      @yyahn  3 ปีที่แล้ว +1

      It’s neovim. :)