• General Linux Chat and Small Questions v.2
    2,323 replies, posted
No, they get indented. Vim just removes the indention on purpose. That's easy to workaround by binding my new line key to quickly add and remove a character to trick Vim in to thinking the line isn't empty. The huge problem is that using my autoindent settings, it translates three spaces to one tab and one space, not three spaces.
You can have per-language settings for indentation. In your ~/.vimrc, put your default indentation settings and the following: [code] filetype plugin on [/code] Now, you can create individual settings files for specific programming languages. Here's my ~/vim/ftplugin/lua.vim: [code] setlocal tabstop=2 setlocal shiftwidth=2 setlocal noexpandtab [/code] You can also have per-file vim settings using [url=http://vim.wikia.com/wiki/Modeline_magic]Modelines[/url].
[QUOTE=esalaka;31309761]Your window manager seems to have exploded. Are you using Unity? It should support Compiz out-of-the-box [editline]24th July 2011[/editline] I never quite figured out how to make lxpanel look (or work!) nice so I just swapped tint2 in its place, using avant-window-navigator for launchers and the main menu.[/QUOTE] I disabled Unity, using classic instead. I'll log back in with Unity enabled now and see if that helps. [editline]24th July 2011[/editline] uh I think I fucked up again I enabled everything I wanted and now the sidebar and top bar of my desktop disappeared
[QUOTE=thelinx;31311162]You can have per-language settings for indentation. In your ~/.vimrc, put your default indentation settings and the following: [code] filetype plugin on [/code] Now, you can create individual settings files for specific programming languages. Here's my ~/vim/ftplugin/lua.vim: [code] setlocal tabstop=2 setlocal shiftwidth=2 setlocal noexpandtab [/code] You can also have per-file vim settings using [url=http://vim.wikia.com/wiki/Modeline_magic]Modelines[/url].[/QUOTE] I don't care about any of that. I just want autoindent to indent according to the previous line's indention. Not replacing stuff with tabs.
I guess that's sort of annoying. I tried to test whether or not it would break anything but apparently all of the text editors I have, including emacs, use 8 char tabs by default. Meh.
[QUOTE=Jookia;31311301]I don't care about any of that. I just want autoindent to indent according to the previous line's indention. Not replacing stuff with tabs.[/QUOTE] I'd like to see an editor detect indentation automatically
His problem is that vim is doing that and converting everything it can to tabs. Try it [code] :set tabstop=8 autoindent noexpandtab i^I a b<esc> [/code] Now there should be two tabs before "b"
okay this is just plain stupid, I've got back into classic desktop mode and reset everything in the compiz config settings manager to the defaults but the default unity UI still doesn't want to load what can I do?
Panic
[QUOTE=esalaka;31311481]His problem is that vim is doing that and converting everything it can to tabs. Try it [code] :set tabstop=8 autoindent noexpandtab i^I a b<esc> [/code] Now there should be two tabs before "b"[/QUOTE] I meant detecting type of indentation (spaces or tabs)
The problem is that vim is [B]converting spaces into tabs[/B], not keeping the same indentation as the line above (which includes spaces)
It's easy to detect the indention: Look at the line above it. It really doesn't get any easier than that. [editline]25th July 2011[/editline] [QUOTE=esalaka;31311551]The problem is that vim is [B]converting spaces into tabs[/B], not keeping the same indentation as the line above (which includes spaces)[/QUOTE] This is the exact problem. Using :set tabstop=2, :set shiftwidth=2 :set autoindent, try to indent 3 spaces without it becoming a tab and a space.
[QUOTE=zerosix;31311482]okay this is just plain stupid, I've got back into classic desktop mode and reset everything in the compiz config settings manager to the defaults but the default unity UI still doesn't want to load what can I do?[/QUOTE] I guess you can try loading up unity and typing "compiz --replace" in terminal and seeing if any errors come up.
[QUOTE=FPtje;31310784]Installing Arch on my PC.[/QUOTE] Grub didn't install properly Installed grub through Linux Mint live USB Arch Linux doesn't boot because the partition doesn't exist apparently (I think I know how to fix that) Windows' master boot record is fucked Fixing it using win7 CD is taking ages. Looks like this is going to be exactly like the first time I installed Arch on a computer. [editline]24th July 2011[/editline] Oh wow all the windows startup repair shit and fixboot doesn't work!
[QUOTE=FPtje;31311960] Oh wow all the windows startup repair shit and fixboot doesn't work![/QUOTE] The funny part is how you expected Microsoft software to work.
[QUOTE=FlamingSpaz;31311773]I guess you can try loading up unity and typing "compiz --replace" in terminal and seeing if any errors come up.[/QUOTE] I can't open terminal unless there's some sort of keyboard shortcut for it
Try Alt-F2. Is there any fix for Ubuntu 11.04/derivatives flash player problems?
[QUOTE=SataniX;31312739]Try Alt-F2. Is there any fix for Ubuntu 11.04/derivatives flash player problems?[/QUOTE] No dice. I'll just run it under safe mode for now and reformat in the morning.
[QUOTE=zerosix;31312930]No dice. I'll just run it under safe mode for now and reformat in the morning.[/QUOTE] Try ctrl+alt+F2
[QUOTE=zerosix;31312667]I can't open terminal unless there's some sort of keyboard shortcut for it[/QUOTE] CTRL+ALT+T Then fiddle untill you can type. I had the same problem before.
the last time i really had a reason to update the kernel, it was on arch. My problem was non-working wireless, blah blah blah. To make a long story short, the kernel I was using (2.6.32 i think) didn't support my broadcom chip. Doing it via wlan wasn't an option for various reasons. In my infinite wisdom, I decided, "fuck it, i'll just compile it myself!" fast-forward a few hours and i'm crying a little. No, that's a lie, i'm crying a lot. It was an assfuck to get working on the dell laptop i was using at the time, and i barely mean that figuratively. It felt like being rammed in the ass. Move to today. I fire up vmware player on my grandmother's computer, totally forgot i had installed it. "Oh neat, a debian VM!. Should be more fun than vista." I boot into the vm, configure a few things, move to testing, etc etc. I run archey to take a screenshot for post your (linux/) desktop. "Oh no, 2.6.32! Time to upgrade!" Well, I do a quick google search. Turns out that with TWO COMMANDS you can now update your kernel version in debian. 6 minutes later, i'm up and running with 2.6.39. tl;dr guys fuck arch i'm moving to debian i'm sure there's some way to do that with pacman but holy SHIT arch has been a clusterfuck
I tried compiling the kernel once. Was running CentOS on that rig. In the end, the clock was showing 5am, the kernel wouldn't boot and I booted into the old kernel, ran rm -rf /* as root and went to bed.
I finally got my boot manager to work, Arch works, but it can't boot properly because it's trying to fsck /dev/sdb2. Now when I installed Arch, I installed it on /dev/sdb2-6, but somewhere when I was trying to fix my GRUB, my PC decided that sdb is now sda, and that sda is now sdb. My computer made an excellent choice in switching those two, as both GRUB AND Arch Linux now mix them up. I managed to fix GRUB by telling it to use the other hard drive. But I've got no clue on how to fix Arch Linux. What can I do to fix this? I've already tried changing the kernal line from sda2 to sdb2. Arch can't find sdb2 while it can find sda2. This is getting annoying: Sometimes sda is my 40GB IDE HDD, and the other time sda is my 500GB SATA drive. This is ridiculous! [b]Edit: Well halleluja, I got it to work[/b] I edited /etc/fstab and changed all [i]sdb[/i] entries to [i]sda[/i]. I rebooted, and sda and sdb were switched up again. When I rebooted again without changing anything, Arch booted normally. Which means the drives switched back again. I don't know if I fixed the drives switching every time I boot.
[QUOTE=FPtje;31324134]wait now GRUB has the hard drives ONE way, and Arch has it the other way! What the fuck![/QUOTE] Now change GRUB settings and it should work
[QUOTE=esalaka;31324251]Now change GRUB settings and it should work[/QUOTE] It has booted properly twice in a row now. I'm not touching anything anymore :v:
[QUOTE=FPtje;31324134]I finally got my boot manager to work, Arch works, but it can't boot properly because it's trying to fsck /dev/sdb2. Now when I installed Arch, I installed it on /dev/sdb2-6, but somewhere when I was trying to fix my GRUB, my PC decided that sdb is now sda, and that sda is now sdb. My computer made an excellent choice in switching those two, as both GRUB AND Arch Linux now mix them up. I managed to fix GRUB by telling it to use the other hard drive. But I've got no clue on how to fix Arch Linux. What can I do to fix this? I've already tried changing the kernal line from sda2 to sdb2. Arch can't find sdb2 while it can find sda2. This is getting annoying: Sometimes sda is my 40GB IDE HDD, and the other time sda is my 500GB SATA drive. This is ridiculous! [b]Edit: Well halleluja, I got it to work[/b] I edited /etc/fstab and changed all [i]sdb[/i] entries to [i]sda[/i]. I rebooted, and sda and sdb were switched up again. When I rebooted again without changing anything, Arch booted normally. Which means the drives switched back again. I don't know if I fixed the drives switching every time I boot.[/QUOTE] Someone needs to learn how to boot via UUIDs.
[QUOTE=snuwoods;31324645]Someone needs to learn how to boot via UUIDs.[/QUOTE] Not as long as this works fine.
Something strange just happened. I was trying to install arch in a Virtualbox VM and it has worked perfectly before. This time install went great, but the installed system has some problems. It's networking doesn't work: I can't resolve any host even though the network worked during install and I picked to put those network settings over to the installed system too. What could be wrong?
[QUOTE=sim642;31326131]Something strange just happened. I was trying to install arch in a Virtualbox VM and it has worked perfectly before. This time install went great, but the installed system has some problems. It's networking doesn't work: I can't resolve any host even though the network worked during install and I picked to put those network settings over to the installed system too. What could be wrong?[/QUOTE] Check /etc/resolv.conf.
After some digging I found out that rc.conf had no interface defined, so no network interface was even set up. I put eth0 as the interface and now it works. I still wonder why the interface wasn't defined during the install. EDIT: For some reason pacman fucked up and I had to run "pacman-db-upgrade" too.
Sorry, you need to Log In to post a reply to this thread.