Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
On Tue, Sep 08, 2020 at 04:04:51PM +0100, Dave Woodfall wrote: On 07/09/20 23:02, Andrzej Telszewski put forth the proposition: I edit using Qt Creator as regular user. You use that as a general purpose editor? Isn't it rather slow compared to plain vim, and doesn't it also need X11 running to use it? Nope - you can also run it under Wayland! :-D ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
On 08/09/20 17:50, Andrzej Telszewski put forth the proposition: > On 08/09/2020 17:04, Dave Woodfall wrote: > > On 07/09/20 23:02, > > Andrzej Telszewski put forth the proposition: > > > I edit using Qt Creator as regular user. > > You use that as a general purpose editor? Isn't it rather slow > > compared to plain vim, and doesn't it also need X11 running to use > > it? > I guess I'm a bit younger than you. :-> > I'm X11 guy, using plain Linux VT only for emergency tasks. > When it comes to speed, well, it doesn't matter. > The machine is fast enough and SlackBuilds are small enough. > > I don't use X11 unless it's absolutely necessary - for example, to > > use a GUI web browser to access some websites that either need > > javascript support that I can't get in my usual browser (elinks), or > > where having images makes life easier (for shopping mostly). Or > > sometimes to test something with a GUI to see if it actually works. > > > > > I then test building in QEMU (libvirt). > > > If your hardware allows, I strongly suggest going this path. > > > There are more added benefits to this choice as well. > > There are some high spec VMs available for admin use, > What do you mean by VM _for admin_? > You mean VM that is not running on your PC, but rather somewhere else, e.g. > in the SBo infrastructure? Yes > > but I only use > > them for large builds that would take a long time and tie my PC up, > > otherwise I use a chroot with an overlay filesystem mounted in RAM. > > At the end of a test session I simple unmount and remount the overlay > > and everything is reset back to a clean chroot. > That is an option. > But I prefer QEMU, since everything is running under regular user, no _root_ > required. > In addition, except for scripts/packages directories, no real hardware (i.e. > /dev /proc /sys) is shared, so the SlackBuild can go mad and it will not > hurt me. I don't mount all of /dev, only a few things that are needed like /dev/null and /dev/pts to be able to use screen. No /sys at all. I usually mount /proc so I can use ps, but most of the files in it are empty. -- Dave Love is a snowmobile racing across the tundra and then suddenly it flips over, pinning you underneath. At night, the ice weasels come. --Friedrich Nietzsche signature.asc Description: PGP signature ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
On 08/09/2020 17:04, Dave Woodfall wrote: On 07/09/20 23:02, Andrzej Telszewski put forth the proposition: I edit using Qt Creator as regular user. You use that as a general purpose editor? Isn't it rather slow compared to plain vim, and doesn't it also need X11 running to use it? I guess I'm a bit younger than you. :-> I'm X11 guy, using plain Linux VT only for emergency tasks. When it comes to speed, well, it doesn't matter. The machine is fast enough and SlackBuilds are small enough. I don't use X11 unless it's absolutely necessary - for example, to use a GUI web browser to access some websites that either need javascript support that I can't get in my usual browser (elinks), or where having images makes life easier (for shopping mostly). Or sometimes to test something with a GUI to see if it actually works. I then test building in QEMU (libvirt). If your hardware allows, I strongly suggest going this path. There are more added benefits to this choice as well. There are some high spec VMs available for admin use, What do you mean by VM _for admin_? You mean VM that is not running on your PC, but rather somewhere else, e.g. in the SBo infrastructure? but I only use them for large builds that would take a long time and tie my PC up, otherwise I use a chroot with an overlay filesystem mounted in RAM. At the end of a test session I simple unmount and remount the overlay and everything is reset back to a clean chroot. That is an option. But I prefer QEMU, since everything is running under regular user, no _root_ required. In addition, except for scripts/packages directories, no real hardware (i.e. /dev /proc /sys) is shared, so the SlackBuild can go mad and it will not hurt me. ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
On 07/09/20 23:02, Andrzej Telszewski put forth the proposition: > I edit using Qt Creator as regular user. You use that as a general purpose editor? Isn't it rather slow compared to plain vim, and doesn't it also need X11 running to use it? I don't use X11 unless it's absolutely necessary - for example, to use a GUI web browser to access some websites that either need javascript support that I can't get in my usual browser (elinks), or where having images makes life easier (for shopping mostly). Or sometimes to test something with a GUI to see if it actually works. > I then test building in QEMU (libvirt). > If your hardware allows, I strongly suggest going this path. > There are more added benefits to this choice as well. There are some high spec VMs available for admin use, but I only use them for large builds that would take a long time and tie my PC up, otherwise I use a chroot with an overlay filesystem mounted in RAM. At the end of a test session I simple unmount and remount the overlay and everything is reset back to a clean chroot. -- Dave Love is a snowmobile racing across the tundra and then suddenly it flips over, pinning you underneath. At night, the ice weasels come. --Friedrich Nietzsche signature.asc Description: PGP signature ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
‐‐‐ Original Message ‐‐‐ On Friday, September 4, 2020 9:09 AM, Dave Woodfall wrote: > On 04/09/20 15:16, > Slackbuilds Users slackbuilds-users@slackbuilds.org put forth the proposition: > > > Hi list, > > Does anyone have (or aware of) a vim formatting rules file for SlackBuilds? > > I recently submitted a SlackBuild that had mixed tabs and spaces... I want > > to avoid that oversight in the future. > > After a quick internet search all I turned up was this, which is for > > automatically treating the *.info file as a shell script: > > > > > > I use those settings everywhere mostly, but you can make an autocmd > for slackbuilds something like: > > au BufRead,BufNewFile *.SlackBuild setl expandtab | > \ setl tabstop=2 | > \ setl etc... > > `setl' is short for`setlocal', and it only works in the buffer with > the slackbuild open, in case you have other buffers open. > > > Dave > Thanks everybody for the feedback. I've appended the following to my ~/.vimrc: --- " Options for SlackBuilds autocmd BufEnter,BufNew *.info call CheckSlackBuildInfo() function CheckSlackBuildInfo() if filereadable(expand('%:p:r'). '.SlackBuild') setlocal filetype=sh endif endfunction autocmd BufEnter,BufNew *.SlackBuild call SetSlackBuildType() function SetSlackBuildType() setlocal filetype=sh setlocal expandtab setlocal tabstop=2 setlocal shiftwidth=2 endfunction --- Erich ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
On 05/09/2020 16:10, Dave Woodfall wrote: I'm not really bothered either way, since I already have vim setup with an autocmd, but I'd like to point out that root's vim has modeline execution turned off by default as a security measure, so if you're in the habit of testing a slackbuild, then edit it, then test again, you would need to keep logging in and out in-between all the time. I edit using Qt Creator as regular user. I then test building in QEMU (libvirt). If your hardware allows, I strongly suggest going this path. There are more added benefits to this choice as well. ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
On 05/09/20 13:49, Slackbuilds Users put forth the proposition: > A vim modeline is just a commented line at the end of the file. Its presence > there shouldn't force anyone to use vim. Neither should it affect anyone who > is using another text editor for editing SlackBuilds, as long as that comment > line just stays there. > I'm merely providing an option rather than strongly trying to advocate for > enforcing such a change, since I'm not even contributing buildscripts to SBo, > so my voice is quiet. > ‐‐‐ Original Message ‐‐‐ > On Saturday, September 5, 2020 10:40 AM, Christoph Willing > wrote: > > On 5/9/20 10:13 am, flinchx via SlackBuilds-users wrote: > > > > > Vim has a thing called modeline. > > > Perhaps such settings could be added straighgt into SlackBuild template > > > files, this will exclude the need for each contributor to manage them > > > explicitly in vimrc? > > > > Not everyone uses vim to edit their SlackBuilds so I'd be against adding > > such support. > > > > chris > > I'm not really bothered either way, since I already have vim setup with an autocmd, but I'd like to point out that root's vim has modeline execution turned off by default as a security measure, so if you're in the habit of testing a slackbuild, then edit it, then test again, you would need to keep logging in and out in-between all the time. It is possible to bypass that security measure, but I wouldn't advise it. -- Dave Love is a snowmobile racing across the tundra and then suddenly it flips over, pinning you underneath. At night, the ice weasels come. --Friedrich Nietzsche signature.asc Description: PGP signature ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
i use pico myself. Apparently there are security reasons why modeline is usually disabled, especially for root user. Tim On 05/09/2020 08:40, Christoph Willing wrote: On 5/9/20 10:13 am, flinchx via SlackBuilds-users wrote: Vim has a thing called modeline. Perhaps such settings could be added straighgt into SlackBuild template files, this will exclude the need for each contributor to manage them explicitly in vimrc? Not everyone uses vim to edit their SlackBuilds so I'd be against adding such support. chris ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/ -- This email has been checked for viruses by AVG. https://www.avg.com ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
A vim modeline is just a commented line at the end of the file. Its presence there shouldn't force anyone to use vim. Neither should it affect anyone who is using another text editor for editing SlackBuilds, as long as that comment line just stays there. I'm merely providing an option rather than strongly trying to advocate for enforcing such a change, since I'm not even contributing buildscripts to SBo, so my voice is quiet. ‐‐‐ Original Message ‐‐‐ On Saturday, September 5, 2020 10:40 AM, Christoph Willing wrote: > On 5/9/20 10:13 am, flinchx via SlackBuilds-users wrote: > > > Vim has a thing called modeline. > > Perhaps such settings could be added straighgt into SlackBuild template > > files, this will exclude the need for each contributor to manage them > > explicitly in vimrc? > > Not everyone uses vim to edit their SlackBuilds so I'd be against adding > such support. > > chris > > SlackBuilds-users mailing list > SlackBuilds-users@slackbuilds.org > https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users > Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ > FAQ - https://slackbuilds.org/faq/ ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
On Sat, Sep 05, 2020 at 05:40:02PM +1000, Christoph Willing wrote: > On 5/9/20 10:13 am, flinchx via SlackBuilds-users wrote: > > Vim has a thing called modeline. > > > > Perhaps such settings could be added straighgt into SlackBuild template > > files, this will exclude the need for each contributor to manage them > > explicitly in vimrc? > > > > Not everyone uses vim to edit their SlackBuilds so I'd be against adding > such support. > > chris Seconded Cheers ... Duncan. ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
On 5/9/20 10:13 am, flinchx via SlackBuilds-users wrote: > Vim has a thing called modeline. > > Perhaps such settings could be added straighgt into SlackBuild template > files, this will exclude the need for each contributor to manage them > explicitly in vimrc? > Not everyone uses vim to edit their SlackBuilds so I'd be against adding such support. chris ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
Vim has a thing called modeline. Perhaps such settings could be added straighgt into SlackBuild template files, this will exclude the need for each contributor to manage them explicitly in vimrc? ‐‐‐ Original Message ‐‐‐ On Friday, September 4, 2020 7:09 PM, Dave Woodfall wrote: > On 04/09/20 15:16, > Slackbuilds Users slackbuilds-users@slackbuilds.org put forth the proposition: > > > Hi list, > > Does anyone have (or aware of) a vim formatting rules file for SlackBuilds? > > I recently submitted a SlackBuild that had mixed tabs and spaces... I want > > to avoid that oversight in the future. > > After a quick internet search all I turned up was this, which is for > > automatically treating the *.info file as a shell script: > > > > -- > > > > https://www.linuxquestions.org/questions/slackware-14/tip-have-vim-handle-slackbuild-info-files-properly-4175628148/ > > Put the following in .vimrc: > > autocmd BufEnter,BufNew *.info call CheckSlackBuildInfo() > > function CheckSlackBuildInfo() > > if filereadable(expand('%:p:r'). '.SlackBuild') > > setlocal filetype=sh > > endif > > endfunction > > Then, if you open a file whose extension is .info and there's a > > corresponding SlackBuild in the same directory, vim will treat the .info > > file as shell script. > > > > - > > > > Based on the SlackBuild template file, it looks like SlackBuild files > > should be indented 2 spaces, and indentation should always be with spaces > > (no tabs). > > I think I want the following options set: > > :set expandtab > > :set tabstop=2 > > :set shiftwidth=2 > > After inheriting all other settings from the filetype 'sh'. > > Erich > > I use those settings everywhere mostly, but you can make an autocmd > for slackbuilds something like: > > au BufRead,BufNewFile *.SlackBuild setl expandtab | > \ setl tabstop=2 | > \ setl etc... > > `setl' is short for`setlocal', and it only works in the buffer with > the slackbuild open, in case you have other buffers open. > > --- > > Dave > > Love is a snowmobile racing across the tundra and then suddenly it flips over, > pinning you underneath. At night, the ice weasels come. > --Friedrich Nietzsche > > SlackBuilds-users mailing list > SlackBuilds-users@slackbuilds.org > https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users > Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ > FAQ - https://slackbuilds.org/faq/ ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
Re: [Slackbuilds-users] Vim indent settings for SlackBuilds
On 04/09/20 15:16, Slackbuilds Users put forth the proposition: > Hi list, > Does anyone have (or aware of) a vim formatting rules file for SlackBuilds? > I recently submitted a SlackBuild that had mixed tabs and spaces... I want to > avoid that oversight in the future. > After a quick internet search all I turned up was this, which is for > automatically treating the *.info file as a shell script: > --- > https://www.linuxquestions.org/questions/slackware-14/tip-have-vim-handle-slackbuild-info-files-properly-4175628148/ > Put the following in .vimrc: > autocmd BufEnter,BufNew *.info call CheckSlackBuildInfo() > function CheckSlackBuildInfo() > if filereadable(expand('%:p:r'). '.SlackBuild') > setlocal filetype=sh > endif > endfunction > Then, if you open a file whose extension is .info and there's a corresponding > SlackBuild in the same directory, vim will treat the .info file as shell > script. > --- > Based on the SlackBuild template file, it looks like SlackBuild files should > be indented 2 spaces, and indentation should always be with spaces (no tabs). > I think I want the following options set: > :set expandtab > :set tabstop=2 > :set shiftwidth=2 > After inheriting all other settings from the filetype 'sh'. > Erich I use those settings everywhere mostly, but you can make an autocmd for slackbuilds something like: au BufRead,BufNewFile *.SlackBuild setl expandtab | \ setl tabstop=2 | \ setl etc... `setl' is short for `setlocal', and it only works in the buffer with the slackbuild open, in case you have other buffers open. -- Dave Love is a snowmobile racing across the tundra and then suddenly it flips over, pinning you underneath. At night, the ice weasels come. --Friedrich Nietzsche signature.asc Description: PGP signature ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
[Slackbuilds-users] Vim indent settings for SlackBuilds
Hi list, Does anyone have (or aware of) a vim formatting rules file for SlackBuilds? I recently submitted a SlackBuild that had mixed tabs and spaces... I want to avoid that oversight in the future. After a quick internet search all I turned up was this, which is for automatically treating the *.info file as a shell script: --- https://www.linuxquestions.org/questions/slackware-14/tip-have-vim-handle-slackbuild-info-files-properly-4175628148/ Put the following in .vimrc: autocmd BufEnter,BufNew *.info call CheckSlackBuildInfo() function CheckSlackBuildInfo() if filereadable(expand('%:p:r'). '.SlackBuild') setlocal filetype=sh endif endfunction Then, if you open a file whose extension is .info and there's a corresponding SlackBuild in the same directory, vim will treat the .info file as shell script. --- Based on the SlackBuild template file, it looks like SlackBuild files should be indented 2 spaces, and indentation should always be with spaces (no tabs). I think I want the following options set: :set expandtab :set tabstop=2 :set shiftwidth=2 After inheriting all other settings from the filetype 'sh'. Erich ___ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/